-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unable to find 15.0 toolset in a project with MSBuild in it's name. #2194
Comments
Relevant code is here Path.GetFileNameWithoutExtension(processName)?
.IndexOf(s, StringComparison.OrdinalIgnoreCase) >= 0); Could be |
I hoped that setting the environment variable |
The same problem occurs if the process's image name contains |
Running Microsoft Visual Studio Enterprise 2017 Int Preview and still seeing this in an xunit test running through the xunit.runner.visualstudio runner from within the VSTS test explorer. |
I stumbled into it too... thanks for reporting it. I guess the first thing you do to test that lib is to create a MsBuild test application with MsBuild in the name... |
While the |
I've run into this too. Great find! |
Forgot about this problem and just ran into it again. 😄 |
Well maybe we should add a link to this issue in the exception 😄 |
Well, the exception is that it can't find the toolset, so that's a bit heavy handed. 😸 |
Fixes the problem where a program using the MSBuild API and containing the string "MSBuild" in its name was incorrectly detected as running in MSBuild.exe in standalone mode. Fixes dotnet#2194.
Fixes the problem where a program using the MSBuild API and containing the string "MSBuild" in its name was incorrectly detected as running in MSBuild.exe in standalone mode. Fixes #2194.
Repro steps:
Expected: The project should loaded fine.
Found: Throws
This is because BuildEnvironmentHelper tries to ascertain the mode in which msbuild is launched and one of the checks it does is to look at the process name and sees if it contains “MSBuild”. In this case, it think the BuildMode is Standalone and doesn't read msbuild.exe.config and hence doesn't get the 15.0 toolset.
The text was updated successfully, but these errors were encountered: