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
526 stars 40 forks source link

FCC not working, everything is 0 #452

Closed Abhijith-Pradeep closed 2 months ago

Abhijith-Pradeep commented 2 months ago

Installed product versions

FCC is not working and the coverage tab is just plain. I had raised the issue earlier but sorry i couldn't respond promptly. I'm working on a .NET8 project and using xUnit as the testing framework. This is the output terminal: "Fine Code Coverage 28-08-2024 7.40.01 PM: Initializing Fine Code Coverage 28-08-2024 7.40.01 PM: Failed Initialization System.InvalidOperationException: Sequence contains no elements at System.Linq.Enumerable.First[TSource](IEnumerable`1 source) at FineCodeCoverage.Engine.OpenCover.OpenCoverUtil.Initialize(String appDataFolder, CancellationToken cancellationToken) at FineCodeCoverage.Engine.CoverageUtilManager.Initialize(String appDataFolder, CancellationToken cancellationToken) at FineCodeCoverage.Engine.FCCEngine.Initialize(CancellationToken cancellationToken) at FineCodeCoverage.Core.Initialization.Initializer.d__13.MoveNext() Fine Code Coverage 28-08-2024 7.42.37 PM: Skipping TestExecutionStarting as FCC not initialized Fine Code Coverage 28-08-2024 7.43.09 PM: Skipping TestExecutionCancelAndFinished as FCC not initialized Fine Code Coverage 29-08-2024 11.11.16 AM: Skipping TestExecutionStarting as FCC not initialized Fine Code Coverage 29-08-2024 11.11.29 AM: Skipping TestExecutionFinished as FCC not initialized Fine Code Coverage 29-08-2024 11.12.46 AM: Skipping TestExecutionStarting as FCC not initialized Fine Code Coverage 29-08-2024 11.15.50 AM: Skipping TestExecutionCancelAndFinished as FCC not initialized Fine Code Coverage 29-08-2024 11.37.58 AM: Skipping TestExecutionStarting as FCC not initialized Fine Code Coverage 29-08-2024 11.38.03 AM: Skipping TestExecutionFinished as FCC not initialized"

Screenshot 2024-08-29 114545

tonyhallett commented 2 months ago

FCC creates the C:\Users***\AppData\Local\FineCodeCoverage directory upon install. Is it present ? You could delete this directory and try again. Do you have multiple installs of visual studio ?

Abhijith-Pradeep commented 2 months ago

yes, the folder was present, i deleted it and tried running the tests, i even tried reinstalling FCC extension in VS, but the problem still persists :( And currently there is only one version of visual studio in my system.

tonyhallett commented 2 months ago

What is the contents of the FineCodeCoverage directory ? If you delete the directory you will need to restart vs. before you run tests check that has installed the directory

Abhijith-Pradeep commented 2 months ago

its working now after deleting the folder and restarting VS, i can see the coverage details. Thank you so much! :)