Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables. When using shims

5k views Asked by At

Test which use Microsoft Fakes Framework fail with exception:

Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables 2016-12-26T14:36:01.6005889Z ##[error] at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.ResolveProfilerPath() 2016-12-26T14:36:01.6005889Z ##[error] at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.Initialize() 2016-12-26T14:36:01.6005889Z ##[error] at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()

Tests debug and run fine on local machine VS2015 but when build in TFS2015 I keep getting this exception. I tried by removing runsettings file path, the build passed but tests didn't run it that case. I have gone through various forums on MSDN none of the solutions fixing my problem. Is there any way to set these environment variables in TFS? Am pretty much blocked here, any suggestions and solutions are welcomed.

1

There are 1 answers

1
Usama Aslam On BEST ANSWER

Alright, issue was pretty stupid. Fakes require enterprise version. I was using enterprise edition on local machine but VSTS was using community edition. Installing enterprise edition solved the problem. That exception was thrown because intellitrace is required for profiling and that was not available in community edition.