Comments (3)
Thanks for reporting and thanks for the repro. When enabling the log it can be seen that it is the same issue as #1102. The assembly Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0,
can't be resolved.
To get coverage with the collector in your repro I had to do two things. Add PreserveCompilationContext
to the assembly under test.
MissingCoverage.Host.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup>
</Project>
And additionally upgrade to coverlet.collector 6.0.1
as we made some improvements to the assembly resolver in this version.
from coverlet.
@daveMueller, thanks for having a look in such a short time and providing a solution. What you suggested worked.
The one thing that I don't understand though is why there is a difference if serviceLifetime
has a default value or not. If that assembly causes the issue there shouldn't be any difference, no?
from coverlet.
@daveMueller, thanks for having a look in such a short time and providing a solution. What you suggested worked. The one thing that I don't understand though is why there is a difference if
serviceLifetime
has a default value or not. If that assembly causes the issue there shouldn't be any difference, no?
Thanks so much for this - you saved us a ton of headaches. Interestingly enough this works fine for us on 6.0.0
when removing that default parameter. Interesting tidbit, this didn't start happening for us until we upgraded to dotnet 8.
from coverlet.
Related Issues (20)
- [BUG] Coverlet.MSBuild 6.0.1/6.0.2 is not compatible with .NET Core 2.2 HOT 2
- [BUG] HasValue of Nullable<T> is not taken into account
- [BUG] Low modules filtering performance HOT 3
- Coverlet Instrument fails to resolve WindowsBase.dll namespace HOT 1
- [BUG] Upgrading v6.0.1 to v6.0.2 increases instrumentation time HOT 7
- Expected behavior when using CreateHardLinksForCopyLocalIfPossible HOT 1
- [BUG] Throw exception via method causes missing coverage HOT 2
- Question: Active logging or suggestions how to investigate a strange functionality HOT 1
- Records without empty primary constructor are not included in code coverage
- Coverage can be merged with `dotnet-coverage` tool
- [BUG] coverage.cobetura.file.xml filenames inconsistent between .NET 7 and .NET 8 HOT 12
- Coverlet file not being created HOT 1
- 0% code coverage and error in collector HOT 1
- [BUG] coverlet generates coverage report for 'Microsoft.ApplicationInsights' package after upgrading to MSTest.TestAdapter 3.2.0 HOT 1
- New Version release
- No or incorrect coverage on expression body members
- Allow to set root directory for ExcludeAssembliesWithoutSources heuristic or other way to exclude internal nuget dependencies on shared CI nodes. HOT 3
- Usage of UseSourceLink results in 500 errors in Azure DevOps. HOT 1
- coverlet nuget package metadata for assemblies is missing/invalid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coverlet.