我正尝试在ASP.NET Core上运行Xunit和Fluent断言的代码覆盖率。但是,我收到了一个我不太了解的错误消息。用OpenCover运行XUnit和FluentAssertions会给出错误信息
我的测试项目的project.json:
{
"version": "1.0.0-*",
"testRunner": "xunit",
"debugType": "portable",
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"FluentAssertions": "4.15.0",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"ExpenseReporting": "1.0.0-*",
"Moq": "4.6.38-alpha"
},
"commands": {
"test": "xunit.runner.dnx"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
}
}
}
}
我对OpenCover命令:
OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test "C:\Users\johndoe\Desktop\Application\ExpenseReporting.Test\project.json"" -output:coverage.xml -register:user -filter:"+[*]* -[xunit*]* -[*]*Migrations.*"
我收到了很多错误,但都是这样的:
An System.IO.DirectoryNotFoundException occured: Could not find a part of the path 'C:\projects\fluentassertions-vf06b\Src\FluentAssertions.NET40\Execution\MSTestFramwork.cs'.
我很清楚该目录没有找到,因为它不存在。我想知道为什么它试图在那里访问它?
你有没有发现任何解决这个? – valorl