无论我选择什么目标,Open Cover的输出始终显示来自(Coverage.xml)的程序集:
<ModulePath>C:\Users\XXX\.nuget\packages\xunit.runner.utility\2.2.0-beta2-build3300\lib\netstandard1.1\xunit.runner.utility.dotnet.dll</ModulePath>
<ModuleTime>2016-06-27T13:43:52Z</ModuleTime>
<ModuleName>xunit.runner.utility.dotnet</ModuleName>
我的批处理文件:
@echo off
SET dotnet="C:/Program Files/dotnet/dotnet.exe"
SET opencover=C:\Users\XXX\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe
SET targetargs="test c:\SfmcAdapter\trunk\dotnet_core\sfmc_adapter\test\SFMC.Adapter.Service.Tests"
SET filter="+[*]*"
SET coveragefile=Coverage.xml
SET coveragedir=Coverage
REM Run code coverage analysis
%opencover% -oldStyle -register:user -target:%dotnet% -output:%coveragefile% -targetargs:%targetargs% -filter:%filter% -skipautoprops -hideskipped:All
我希望它能够获取我的程序集覆盖范围,而不是xunit程序集。
答案 0 :(得分:3)
我弄明白了,请确保在project.json
文件中将debugType
设置为已满。然后我能够看到报道。以前这被设置为“便携式”。
"debugType": "full"