microsoft / MSBuildLocator

An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
216 stars 83 forks source link

MSBuildLocator.QueryVisualStudioInstances hangs if COREHOST_TRACE is set to 1 #128

Closed FiniteReality closed 2 years ago

FiniteReality commented 3 years ago

A hang can occur when locating the .NET SDK using dotnet --info, if the COREHOST_TRACE environment variable is set to 1. This is because RedirectStandardError is set to true, and nothing reads from the standard error stream.

rainersigwald commented 3 years ago

Thanks for the report! This would be avoided by #111 but I think we'd also take a patch to stop reading stderr.