VS2022 Enterprise edition, "Analyze Code Coverage" in the Test Explorer window doesn't produce Coverage results

2022-05-12T16:21:17.067+00:00

On VS2022 Enterprise edition, when I run "Analyze Code Coverage" in the Test Explorer window I never see any results. If I look in the Event Viewer I see some errors associated to Dynamic Code Coverage. The first error says it has trouble loading the CodeCoverage.config file due to an unknown entry named EnableStaticNativeInstrumentation.

I don't know where that config file is coming from or how to correct the entry,

Thanks,

Teresa

Developer technologies Visual Studio Debugging
Developer technologies Visual Studio Setup
Developer technologies Visual Studio Other
{count} votes

1 answer

Sort by: Most helpful
  1. Chatkoff, Teresa [AUTOSOL/PSS/AUS] 1 Reputation point
    2022-05-27T20:33:09.95+00:00

    I tried creating a simple c# .net framework project and it worked until I output it to the same folder as our other binaries. Then even the simplest project failed. I narrowed it down to the presence of a single dll: Microsoft.VisualStudio.TraceDataCollector.dll. One of our test projects included it and it got copied to the output folder. If I remote that dll then code analysis works again.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.