You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Pipeline运行单元测试时Runsettings文件疑似被忽略的问题求助

Pipeline运行单元测试时Runsettings文件疑似被忽略的问题求助

我这个问题已经卡了好一阵子,怎么都解决不了。我自己创建了一个runsettings文件,想在流水线里用它来排除部分.cs和.cshtml文件,不让它们出现在覆盖率统计结果里。但看起来这个runsettings文件完全被忽略了——不过我能确定流水线是找到这个文件的,因为要是我改了它的文件名,任务直接就会报错说“File not found”。

下面是我的流水线配置:

- task: DotNetCoreCLI@2
  displayName: 'DotNetCore Test'
  inputs:
    command: 'test'
    projects: '$(uniTestProject)'
    arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code coverage" --settings coverage.runsettings'
    publishTestResults: true

- task: PublishCodeCoverageResults@2
  displayName: "Publish Code Coverage Report"
  inputs:
    summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'

我的runsettings文件内容如下:

<!-- 原提问中此处内容未完整粘贴 -->

备注:内容来源于stack exchange,提问作者Tupea Andrei

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 11:24:35