Code Coverage Results periodically gives: Empty results generated

后端 未结 8 1081
温柔的废话
温柔的废话 2021-01-12 05:18

I\'ve run into a recurring problem with a few different projects using MSTest in VS2012, where every now and then my code coverage stops working (seemingly at random) and in

8条回答
  •  不思量自难忘°
    2021-01-12 05:31

    If you can't make the Code Coverage to work even after you've deleted the *.suo file, please check your Event Viewer for errors. In my case, after each run I had the following error:

    "TraceLog Profiler failed in initialization due to a lack of instrumentation methods, process vstest.executionengine.x86.exe"

    I've found the answer here.

    In case the link is no longer available, I'm pasting the content in here:

    If you find yourself with a an empty .coverage file and see errors similar to the below in your event logs you most probably have a corrupt install

    (info) .NET Runtime version 4.0.30319.17929 - The profiler has requested that the CLR instance not load the profiler into this process. Profiler CLSID: '{b19f184a-cc62-4137-9a6f-af0f91730165}'. Process ID (decimal): 12624. Message ID: [0x2516].

    (Error) TraceLog Profiler failed in initialization due to a lack of instrumentation methods, process vstest.executionengine.x86.exe

    Check

    a) Environment variable VS110COMNTOOLS is set to \common7\tools

    b) Regkey HKLM\SOFTWARE\Microsoft\VisualStudio\11.0\InstallDir is set to your \Common7\IDE\

    c) covrun32.dll and covrun64.dll exist in "\Team Tools\Dynamic Code Coverage"

    Good luck,

    Nadav

提交回复
热议问题