-
Notifications
You must be signed in to change notification settings - Fork 389
Failed to resolve assembly
when running dotnet test with coverage
#33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
New NuGet released https://www.nuget.org/packages/coverlet.msbuild/1.1.0. Feel free to reopen if you still run into the issue |
Works like a charm. Thank you! |
Just for reference, I had the same issue with some 3rd party packages, even with version 1.1.1. |
Confirmed, I've got |
PS: An even better way than modifying your *.csprof file is to run dotnet test like |
Thanks ! This also solved an issue for me when running tests on libraries relying on |
Confirmed, I've got Failed to resolve assembly: 'Microsoft.Extensions.Logging.Abstractions error and running dotnet test like |
Perhaps this can be added to the |
Had this happening with 2.3.2. |
Make also sure assembly resolution works. See coverlet-coverage/coverlet#273 and coverlet-coverage/coverlet#33
Is using |
When I run command
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
all test are passing and code coverage is correctly generated which is good. However returned exit code from command is 1 due to this error:
coverlet.msbuild\1.0.2\build\netstandard2.0\coverlet.msbuild.targets(13,5): error : Failed to resolve assembly: 'Common, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' [C:\Source\Repos\MyApp\src\Test\Test.csproj]
Where
Common
is one of the referenced projects.When I just run
dotnet test
everything is working and exit code is 0.The text was updated successfully, but these errors were encountered: