My problem is very similar to one reported here: UnitTestIsolationException when debugging tests using Fakes
However, I am not even able to run the tests. Using the sample code provided here: Isolating Code Under Test with Microsoft Fakes (Getting Started with Shims), I get following exception on running the test below :
the offending line is :
using (ShimsContext.Create())
Exception on running the test:
Test Name: TestMethod1
Test FullName: TestingShimsAndStubs.UnitTest1.TestMethod1
Test Source: c:\poc\TestingShimsAndStubs\TestingShimsAndStubs\UnitTest1.cs : line 12
Test Outcome: Failed
Test Duration: 0:00:00.0182403
Result Message:
Test method TestingShimsAndStubs.UnitTest1.TestMethod1 threw exception: Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to get profiler module handle 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\12.0.0\Microsoft.IntelliTrace.Profiler.12.0.0.dll'. The specified module could not be found ---> System.ComponentModel.Win32Exception: The specified module could not be found Result StackTrace: at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.LibraryMethods.GetModuleHandle(String fileName) at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath) --- End of inner exception stack trace --- at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath) 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 TestingShimsAndStubs.UnitTest1.TestMethod1() in c:\poc\TestingShimsAndStubs\TestingShimsAndStubs\UnitTest1.cs:line 16
I am using Microsoft Visual Studio Ultimate 2013 Edition (Version 12.0.40629.00 Update 5) with .Net Framework v 4.6.01055 on my machine. Also tried running the tests on Visual Studio 2015 Enterprise Edition as well