I am trying to run code coverage with Xunit and Fluent Assertions on ASP.NET Core. However, I am getting an error message which I don't really understand.
My project.json of the test project:
{
"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"
}
}
}
}
}
My command for 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.*"
I receive a lot of errors, but all are of this kind:
An System.IO.DirectoryNotFoundException occured: Could not find a part of the path 'C:\projects\fluentassertions-vf06b\Src\FluentAssertions.NET40\Execution\MSTestFramwork.cs'.
It is clear to me that the directory is not found because it doesn't exist. I am wondering why it tries to access it there?