Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with Microsoft Fakes #4441

Open
avivanoff opened this issue Dec 24, 2024 · 2 comments
Open

Possible issue with Microsoft Fakes #4441

avivanoff opened this issue Dec 24, 2024 · 2 comments

Comments

@avivanoff
Copy link

A project that uses MSTest.Sdk/3.7.0 and EnableMicrosoftTestingExtensionsFakes set to true has issues execution tests that use fakes. Partial trace output:

  Message:
Test method TestMethod1 threw exception: 
Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables.

  Stack Trace: 
IntelliTraceInstrumentationProvider.ResolveProfilerPath()
IntelliTraceInstrumentationProvider.Initialize()
UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()
ShimRuntime.CreateContext()

Unfortunately, I was not able to create a project to reproduce the issue.

@avivanoff
Copy link
Author

avivanoff commented Dec 24, 2024

Some additional observations:

  • Test project targets .NET Framework 4.8.
  • Running EXE directly results in the same error.
  • Running the tests using vstest.console.exe has no issues.
  • Converting back to non-MSTest.Sdk works as expected.

@avivanoff
Copy link
Author

Finally, I was able to create a sample project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants