In our project we use NCover to measure our code coverage. If we measure tests which uses Moles the code coverage for those classes are not measured (0%). This has something to do with both Moles and NCover using the .NET profiler. After some searching on the internet I tried the following in command prompt without any result:
set COR_PROFILER={3FB1CC1E-1C17-4A37-9C18-BF3DB8F10E46} moles.runner.exe /pi:Dispatch /r:"C:\Program Files\NCover\NCover.Console.exe" "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /args:/testcontainer:..\Bin\TestLib.dll"
The number behind the COR_PROFILER
is the NCover.Lib.x86.dll
GUID which I previously registered with regsvr. Also adding COR_ENABLE_PROFILING=1
as env.var doesn't help.
Is there anyone who got this profiler chaining working or has experience with .NET profiler chaining?