FortuneN / FineCodeCoverage

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage
Other
527 stars 40 forks source link

Set the target for OpenCover #209

Closed tonyhallett closed 9 months ago

tonyhallett commented 2 years ago

As per @BOnstwedder request

Last I was wondering if it were possible to set the target for opencover, as it would be nice to set this to our locally installed nunit3console exe

in https://github.com/FortuneN/FineCodeCoverage/issues/136#issuecomment-842292976

@FortuneN

I was going to add an option for the register argument as there appears to be a requirement for it https://github.com/FortuneN/FineCodeCoverage/issues/167 and https://github.com/FortuneN/FineCodeCoverage/issues/191#issuecomment-971342401.

Apparently below is not sufficient.

project.Is64Bit = container.TargetPlatform.ToString().ToLower().Equals("x64");

• -register[:user] - Use this switch to register and de-register the code coverage profiler. Alternatively use the optional user argument to do per-user registration where the user account does not have administrative permissions. Alternatively use an administrative account to register the profilers using the regsvr32 utility. If you do not want to use the registry entries, use -register[:Path32] or -register[:Path64]to let OpenCover select the profiler for you. Depending on your choice it selects the /x86/OpenCover.Profiler.dll or /x64/OpenCover.Profiler.dll. You should also consider using path32 and path64 options when profiling .net core targeted applications and .net 4.8 framework.

How would you like to proceed on the register argument, target ( and target args ) and additional arguments that we do not provide ?

FortuneN commented 2 years ago

The assumption was that we could auto determine what is required.

Since, it seems, we cannot do that in all cases we could allow manual input to override the automatic default. If we know something new we should continue to improve the automatic default so that manual input is required for a minority of cases.

tonyhallett commented 9 months ago

Available in latest version