Comments (9)
Nice diagnosis. I guess it should track assemblies by path, not just assembly name.
I will create a PR to fix it. Thanks
from minicover.
@Quickstream , it should be fixed now.
Can you please try the new nuget package: MiniCover 2.0.0-ci-20180211032654 ?
from minicover.
Hi,
I gave the new version I try. At first, it seemed to be working, but after a few attempts I ended getting the following error:
Unhandled Exception: System.ArgumentException: An item with the same key has already been added. Key:
at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object key)
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer`1 comparer)
at MiniCover.Reports.BaseReport.Execute(InstrumentationResult result, Single threshold)
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at MiniCover.Program.Main(String[] args)
...: warning MSB3073: The command "dotnet minicover htmlreport --workdir ../ --threshold 80" exited with code 134.
If I look at the coverage.json file, I see 2 entries for the same assembly in the "Assemblies" array, each of which has one entry in the "Locations" array. I think the expected result would be one entry in the Assemblies array with 2 entries in the Locations array.
from minicover.
Running dotnet build immediately prior to instrumentation didn't resolve the issue, but running dotnet clean, then dotnet build prior to instrumentation did resolve the issue.
However, if I then ran dotnet build on just my IntegrationTests project and then tried instrumentation again, I was able to reproduce the issue.
from minicover.
It creates 2 entries with same assembly because the assembly files are binary different, so the instrumentation might be different. Maybe one is obsolete after you partially built the solution.
It happens that even rebuilding an assembly from same source code, it will generate a different binary because there are some compilation timestamps inside the assembly.
I can fix the report to nicely handle the duplicated assembly on coverage.json. But I'm still not sure if that's a good approach. Maybe I will need to do a more fundamental change.
from minicover.
@Quickstream, that issue with report should be fixed on build: MiniCover 2.0.0-ci-20180214071708
Edit:
The only time I copied the Nuget version before the build finishes it failed to push nuget package 😄
https://travis-ci.org/lucaslorentz/minicover/builds/341312354
Use this version instead: MiniCover 2.0.0-ci-20180214203020
from minicover.
@Quickstream can we close this issue?
from minicover.
Sorry I'm on vacation. I haven't had a chance to try the latest build yet.
from minicover.
Should be fixed by now. Please, reopen the issue if necessary.
from minicover.
Related Issues (20)
- Exclude auto properties and/or generated code for closures/linq HOT 1
- Generate report per test? HOT 11
- Minicover 3.1.0 is not output the cover HOT 4
- .NET 5 support? HOT 3
- Move ShouldInstrumentAssemblyFile to InstrumentationContext HOT 3
- Less prerequisites for instrumentation HOT 11
- System.NotImplementedException: GenericInst HOT 1
- Build fails on Azure DevOps HOT 1
- Official maintainer? HOT 1
- no exception , but I can see the message like "DependencyContext.RuntimeLibraries. No information about assebmly Tizen.NUI!" HOT 1
- Need -line-coverage-lt and -line-coverage-gt of llvm-com analogues HOT 1
- Net6 support HOT 5
- --threshold no longer supported for opencoverreport HOT 2
- Instrumenting C# 9 init-only property produces invalid assembly HOT 4
- Using Records with `with` keyword results in "Common Language Runtime detected an invalid program" HOT 1
- Add .NET 7.0 support HOT 5
- Unhandled exception. System.NullReferenceException: .NETcore 7.0 HOT 2
- Getting `System.IO.FileNotFoundException` for .pdb HOT 1
- Minicover 3.6.1 does not generate coverage after implementing GeneratedRegex from .NET7. HOT 1
- Support for .net 8
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 minicover.