I am using unit test project along with MS Fakes mocking framework within
Visual Studio Premium 2013 Update 4
. It works fine when I run my tests within visual studio, but when I try to debug unit test cases it fails with below error:
Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables.
Following methods I have tried:
- Specific Version to false [Not worked]
- Removed all fakes, clean, build and readded [Not worked]
- Added System and mscorlib fakes [Not worked]
Edit:
[TestMethod]
public void LoginResponseTest()
{
using (ShimsContext.Create())//Getting error here in case of debug test
{
var stub = new StubISimpleHttpService();
stub.SendPostRequestStringParameterCollection = GetLoginResponse;
MyAPIConnector connector = new MyAPIConnector();
uint response = connector.login("test_username", "test_password");
Assert.IsTrue(response == 0);
}
}
Any solutions?