-
Notifications
You must be signed in to change notification settings - Fork 386
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
Failed to resolve assembly #560
Comments
Can you try to add include filter https://github.com/tonerdo/coverlet/blob/master/Documentation/MSBuildIntegration.md#filters and include only dll you want? |
I added the exclude filter and while it changed the output, the problem remains. I will continue trying to create a sample project...
|
Could be very useful a repro! Ah another thing...try also with an "include" because exclude doesn't mean that some other instrumented lib will try to load excluded one...with include we're sure that the "wanted instrumented lib" need that load. |
OK, I have a reproducer that should work outside of our environment. Since it still is loosely based on our business application, I have added you as a collaborator to the private GitHub project. Let me know if you need anything else. |
I see thank's I'll take a look asap. |
@rpatrick00 I found the issue...at the moment I don't have a fix, it's related to how cecil(library that we use to instrument dll) load transitive reference from .nuget packages folder. |
Thanks! |
Thank's to you for repro! |
Setting |
Experiencing the same issue: .Net Core 2.2 project using xUnit 2.4.1 and coverlet.msbuild 2.7.0.
No luck with:
|
Hi @jeffw-wherethebitsroam I've just added this issue as "know issue" I'm in contact with msbuild team(you can read linked issue) but at the moment the only solution is to manually copy missing dll to output build folder https://github.com/tonerdo/coverlet/blob/master/Documentation/KnowIssues.md#4-failed-to-resolve-assembly-during-instrumentation |
@jeffw-wherethebitsroam the issue will be resolved by design in 3.0 maybe if your project is netstandard libs and test is 2.x you can move to 3.0 only test proj. |
@rpatrick00 @jeffw-wherethebitsroam guys you can test this update using nightly build, if you can I'll appreciate a lot(starting from tomorrow we publish in the night) https://github.com/tonerdo/coverlet/blob/master/Documentation/ConsumeNightlyBuild.md |
Copying the file manually works.. any idea on how to copy the dll from a NuGet package? |
Nevermind. For now, I'm doing a dotnet publish and copying the required file to the appropriate location. Things are working fine. |
@nmarun ok, if you want to try without publishing you can try to dogfood nightly build that help to fix this issue https://github.com/tonerdo/coverlet/blob/master/Documentation/ConsumeNightlyBuild.md |
coverlet.msbuild 2.8.0 fixed the issue in all but one of my projects. I updated them while migrating them to Dotnet Core 3.1 today. Haven't been able to determine what makes this one project different than all of the others yet... |
Thank's @rpatrick00 could be something related to #655 we're investigating...could be great if you provide another repro to understand if we're on right path and the issue is the same, at you pace no rush. |
@MarcoRossignoli
|
@subramaniamb can you open a new issue pls, at first glance seem a different issue, the log seems not related to assembly resolution. |
Really appreciate your quick response. New Issue raised. |
I have a .Net Core 2.2 project using xUnit 2.4.0, the SonarScanner for MSBuild 4.7.1, and coverlet.msbuild 2.6.3 to measure code coverage of my unit tests. The project also uses Nest 6.4.0 (Elasticsearch high-level client for C#) and other related packages. The code and unit tests all work fine without the coverlet.msbuild package dependency.
When I add the coverlet.msbuild package dependency to my unit tests project, I get an error from coverlet.msbuild:
I have spent days searching, reading, and trying various solutions to resolve this.
/p:CopyLocalLockFileAssemblies=true
option to thedotnet test
command-line.The aforementioned DLL is present in multiple locations on my local machine:
C:\Users\robert.h.patrick\.nuget\packages\microsoft.extensions.logging.abstractions\2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll
C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.logging.abstractions\2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll
).The only reliable way to work around this problem is to drop the DLL in the unit tests project's
bin\Release\netcoreapp2.2
directory.I have the same problem on my Jenkins build machine running on Amazon Linux 2.
The text was updated successfully, but these errors were encountered: