Unable to run Unit Tests that uses Microsoft Fakes - Exception in ShimsContext.Create () method

My problem is very similar to that described here: UnitTestIsolationException when debugging tests using fakes

However, I cannot even run the tests. Using the code example given here: Isolate code when testing using Microsoft fakes (Getting Started with Gaskets), I get the following exception when running the test below:

violation line:

using (ShimsContext.Create())

Exception when starting the test:

Test Name: TestMethod1
    the Test the FullName: TestingShimsAndStubs.UnitTest1.TestMethod1
    test Source: c: \ poc \ TestingShimsAndStubs \ TestingShimsAndStubs \ UnitTest1.cs: line 12
    Test result: a failure
    of the test Duration: 0: 00: 00.0182403

Report Results:

TestShimsAndStubs.UnitTest1.TestMethod1 :         Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: 'C:\Program Files (x86)\Microsoft Visual Studio 12,0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\12.0.0\Microsoft.IntelliTrace.Profiler.12.0.0.dll. --- > System.ComponentModel.Win32Exception: StackTrace:     Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.LibraryMethods.GetModuleHandle( )         Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath)      --- ---          Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath)         Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.Initialize()         Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()         Microsoft.QualityTools.Testing.Fakes.Shims.ShimRuntime.CreateContext()         Microsoft.QualityTools.Testing.Fakes.ShimsContext.Create()         TestingShimsAndStubs.UnitTest1.TestMethod1() c:\poc\TestingShimsAndStubs\TestingShimsAndStubs\UnitTest1.cs: 16

Microsoft Visual Studio Ultimate 2013 Edition ( 12.0.40629.00 5) .Net Framework v 4.6.01055 . Visual Studio 2015 Enterprise Edition,

+1
1

, VS2013/VS2015, (Start → Right Click Visual Studio 2013 → Run As Administrator), , , !!!

, , . , , . !

Unit Tests, Microsoft Fakes,

0

All Articles