UnitTestIsolationException while trying to profile unit test

I use Visual Studio 2013 Update 1. Windows 8.1 x64, dotTrace 5.5.4

Whey I trying to profile unit test with Shims, dottrace worked till  function ShimsContext.Create() call and after that I have got this exception:

Class Initialization method UnitTests.GlobalLinksService.GlobalLinksServiceTest.ClassInitialize threw exception. Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables..
   at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.ResolveProfilerPath()
   at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.Initialize()
   at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()
   at Microsoft.QualityTools.Testing.Fakes.Shims.ShimRuntime.CreateContext()
   at Microsoft.QualityTools.Testing.Fakes.ShimsContext.Create()
   at UnitTests.Database.CreateDatabase() in Database.cs: line 38
   at UnitTests.GlobalLinksService.GlobalLinksServiceTest.ClassInitialize(TestContext testContext) in GlobalLinksServiceTest.cs: line 39

What's the problem? Any workaround?


Hello Andrey,
How do you run your tests? Are there any exceptions when they're executed without dotTrace?


I run Profile from context menu Resharper Unit Tests window.
If I use Run or Debug from that context menu, everything is fine. Test passed and there is no exception.


Hello Andrey,
I'm terribly sorry for such delay; please try the new version: http://www.jetbrains.com/profiler/download/
Please let me know if the issue is ыtill reproducible.


There is the same error with new version :_|


Unfortunatelly for now there are no workaround.
Please vote for this youtrack request http://youtrack.jetbrains.com/issue/DTRC-9980


Please sign in to leave a comment.