If you cannot get Code Coverage to work even after you delete the * .suo file, check out the Event Viewer for errors. In my case, after each run, I had the following error:
"TraceLog Profiler failed to initialize due to lack of toolkit methods, the vstest.executionengine.x86.exe process"
I found the answer here .
If the link is no longer available, I insert the content here:
If you find an empty .coverage file and see errors similar to the one below in your event logs, you most likely have a damaged installation
(info) .NET Runtime version 4.0.30319.17929 - The profiler has requested that the CLR instance not load the profiler into this process. CLSID profiler: '{b19f184a-cc62-4137-9a6f-af0f91730165}'. Process ID (decimal): 12624. Message ID: [0x2516].
(Error) TraceLog Profiler could not be initialized due to a lack of instrumentation methods, the vstest.executionengine.x86.exe process
Check
a) The environment variable VS110COMNTOOLS is set to \ Common7 \ tools
b) Installed Regkey HKLM \ SOFTWARE \ Microsoft \ VisualStudio \ 11.0 \ InstallDir to your \ Common7 \ IDE \
c) covrun32.dll and covrun64.dll exist in "\ Team Tools \ Dynamic Code Coverage"
Good luck
Nadav
source share