$ ls
bin Controllers obj ReactCore.Tests.Unit.csproj Services
$ dotnet test /p:CollectCoverage=true
MSBUILD : error MSB1009: Project file does not exist.
Switch: p:CollectCoverage=true
Hi guys, any ideas why I have this error?
Thanks,
A
It's a MS error, so try to test first before using coverlet
I am using bash terminal to run this. And "dotnet test" will not have this issue.
Then I switched to VS PM console. Now both can run.
Thank you all the same.
Note for those who find this and are also using the bash terminal... The following works:
dotnet test -p:CollectCoverage=true
@kellystuard Is the format -p:CollectCoverage=true preferred over /p:CollectCoverage=true as shown in the documentation?
The dash (-) format is for use in the bash terminal. The forward-slash (/) format works for PowerShell.
If you're using the bash terminal and the forward-slash, you get this weird MSB1009 error.
Most helpful comment
Note for those who find this and are also using the bash terminal... The following works:
dotnet test -p:CollectCoverage=true