-
-
Notifications
You must be signed in to change notification settings - Fork 46
One Project don't show any coverage #287
-
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:
But in FCC I see no coverage even in the log file the Core.UI.UILibrary is missing.
Beta Was this translation helpful? Give feedback.
All reactions
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
-
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
Beta Was this translation helpful? Give feedback.
All reactions
-
You do with FCC with SDK style projects and you have not set RunMsCodeCoverage
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you send me an example for this?
Beta Was this translation helpful? Give feedback.
All reactions
-
Of RunMsCodeCoverage ?
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
RunMsCodeCoverage is an FCC setting.
Link
Beta Was this translation helpful? Give feedback.
All reactions
-
But I don't use MS Test and it works for all other project without this setting
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
image
This is my actual setting
Beta Was this translation helpful? Give feedback.
All reactions
-
I could see that from your previous screenshot.
Beta Was this translation helpful? Give feedback.
All reactions
-
This must be Yes?
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks set it to true seems to solve the problem
Beta Was this translation helpful? Give feedback.