Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

One Project don't show any coverage #287

Answered by tonyhallett
MichaelInsberg asked this question in Q&A
Discussion options

Hi, I user FCC with VS2022 and it works pretty well.

But for one project I get no Coverage in the log file I see this error message:

Unable to instrument module: C:\Projekte\Framework4.0\Build\Tests\Debug\fine-code-coverage\build-output\Core.UI.UILibrary.dll because : Failed to resolve System.Windows.Threading.DispatcherPriority

The Project file looks like this:

<PropertyGroup>
 <TargetFramework>netcoreapp3.1</TargetFramework>
 <RootNamespace>$(SolutionName).$(MSBuildProjectName)</RootNamespace>
 <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
 <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
 <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
 <UseWpf>true</UseWpf>
</PropertyGroup>

If I use another coverage tool l see the coverage result of this project:

image

But in FCC I see no coverage even in the log file the Core.UI.UILibrary is missing.

You must be logged in to vote

I assume you are receiving coverage from coverlet. This may help coverlet-coverage/coverlet#1221

Alternatively you could switch to the ms code coverage option. Although there is an issue with async methods until the next release

Replies: 3 comments 14 replies

Comment options

I assume you are receiving coverage from coverlet. This may help coverlet-coverage/coverlet#1221

Alternatively you could switch to the ms code coverage option. Although there is an issue with async methods until the next release

You must be logged in to vote
6 replies
Comment options

You do with FCC with SDK style projects and you have not set RunMsCodeCoverage

Comment options

Can you send me an example for this?

Comment options

Of RunMsCodeCoverage ?

Comment options

I use Nunit for Unit Tests not MsUnit.

image

And don't have the option discribe here:

Comment options

Answer selected by tonyhallett
Comment options

RunMsCodeCoverage is an FCC setting.
Link

You must be logged in to vote
1 reply
Comment options

But I don't use MS Test and it works for all other project without this setting

Comment options

FCC does not do coverage itself. It uses one of Coverlet, OpenCover or Microsoft. Each of these coverage services can work with NUnit, XUnit or MSTest.

For your project Coverlet is being used, hence the first link I provided.
You can switch to Microsoft by setting the FCC option RunMsCodeCoverage. The second link I provided.

You must be logged in to vote
7 replies
Comment options

image
This is my actual setting

Comment options

I could see that from your previous screenshot.

Comment options

This must be Yes?

Comment options

If you are not supplying your own runsettings then yes. If you use Ms code coverage then until the next release async methods are not covered properly. So I do suggest that you look at the coverlet issue link, as it is specifically about missing wpf dlls and how to rectify.

Comment options

Thanks set it to true seems to solve the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /