-
-
Notifications
You must be signed in to change notification settings - Fork 46
FCC Coverage doesn't include Project being tested #134
-
Hello!
I'm using VS Pro, trying to get some visual code coverage going and FCC seems to be what I'm looking for. I've got the latest extension installed (1.1.141) and it appears to be working, but the project I'm actually testing isn't appearing in the Coverage tab of the FCC, and therefore I don't get the actual sidebar code coverage highlighting that I'm looking for.
For example, I have two projects in my solution: Main
and Main.Tests
. Under Coverage, only Main.Tests
shows up with the list of tests run.
Edit - I should note that my Main
project is a .NET Framework 4.0 project, and my Main.Tests
is a .NET 5.0 project.
Any suggestions of where I might start looking?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
What does the FCC output window pane show ?
Replies: 1 comment 3 replies
-
What does the FCC output window pane show ?
Beta Was this translation helpful? Give feedback.
All reactions
-
It's got a bunch of these:
Fine Code Coverage : ================================== START ==================================
Fine Code Coverage : Run Coverage Tool (Main.Test)
BadImageFormatException during MetadataReaderProvider.FromPortablePdbStream in InstrumentationHelper.PortablePdbHasLocalSource, unable to check if module has got local source.
Unable to instrument module: D:\----redacted----\Release\net5.0-windows\fine-code-coverage\build-output\----redacted---- because : AssemblyResolutionException for 'System.Diagnostics.EventLog, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Try to add <PreserveCompilationContext>true</PreserveCompilationContext> to test projects </PropertyGroup> or pass '/p:CopyLocalLockFileAssemblies=true' option to the 'dotnet test' command-line
But there's no reference to Main
- it's almost like it's excluding it or it doesn't know it's there.
Beta Was this translation helpful? Give feedback.
All reactions
-
^^ This might be my problem - I didn't realize that unable to instrument module
was coming from my Main
project. I'll sort that out and report back.
Beta Was this translation helpful? Give feedback.
All reactions
-
I figured it out - it was two things:
- following the
unable to instrument module
error, I added theSystem.Diagnostics.ErrorLog
package to my dependencies - I had installed the FCC extension from the web, not directly from VS, which got me version 1.3.0 of
coverlet.collector
. Looking at my updates, 3.0.3 was available and I've now installed that
I've got code coverage highlighting where I was expecting it - thanks for being my sounding board and letting me think out loud!
Beta Was this translation helpful? Give feedback.