Skip to content

Commit e4a1a88

Browse files
authored
fix finding toolchains when invoked by msbuild (#1201)
1 parent e8b13ba commit e4a1a88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/windows/find_tools.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,10 @@ mod impl_ {
363363
) -> Option<Tool> {
364364
// Early return if the environment isn't one that is known to have compiler toolsets in PATH
365365
// `VCINSTALLDIR` is set from vcvarsall.bat (developer command prompt)
366-
// `VisualStudioDir` is set by msbuild when invoking custom build steps
366+
// `VSTEL_MSBuildProjectFullPath` is set by msbuild when invoking custom build steps
367+
// NOTE: `VisualStudioDir` used to be used but this isn't set when invoking msbuild from the commandline
367368
if env_getter.get_env("VCINSTALLDIR").is_none()
368-
&& env_getter.get_env("VisualStudioDir").is_none()
369+
&& env_getter.get_env("VSTEL_MSBuildProjectFullPath").is_none()
369370
{
370371
return None;
371372
}

0 commit comments

Comments
 (0)