I am using VS2015 with Update 3. I have a simple hello world unit test project where I am trying to get the shimContext , below is the code snippet. I am getting the exception at shimContext to create call: *
Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException' occurred in Microsoft.QualityTools.Testing.Fakes.dll Additional information: Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables.
*
[TestClass]
public class UnitTest1
{
private IDisposable shimsContext;
[TestMethod]
public void TestMethod1()
{
shimsContext = ShimsContext.Create();
Assert.IsTrue(true);
}
}
I have browsed a lot of articles on StackOverflow, MSDN regarding the suggested workarounds and none of them seem to resolve the issue. Following are the list of workarounds I have tried.
- To use a unit test runner that initializes IntelliTrace during startup (used two plugins CodeRush and Resharper both yield same exception).
- To link a .runsettings file with ForcedLegacyMode - True, this also yielded the same exception.
A sample demo unit test trying to create a shimsContext was created to verify if the problem is isolated to the environment.
Run vstest.console.exe via command line to verify if tests are running in the command line, this too gave the same exception.
Any suggestions/advice?
Thanks - Keerti.