diff --git a/src/windows/find_tools.rs b/src/windows/find_tools.rs index 8a305621..54470f3e 100644 --- a/src/windows/find_tools.rs +++ b/src/windows/find_tools.rs @@ -363,9 +363,10 @@ mod impl_ { ) -> Option { // Early return if the environment isn't one that is known to have compiler toolsets in PATH // `VCINSTALLDIR` is set from vcvarsall.bat (developer command prompt) - // `VisualStudioDir` is set by msbuild when invoking custom build steps + // `VSTEL_MSBuildProjectFullPath` is set by msbuild when invoking custom build steps + // NOTE: `VisualStudioDir` used to be used but this isn't set when invoking msbuild from the commandline if env_getter.get_env("VCINSTALLDIR").is_none() - && env_getter.get_env("VisualStudioDir").is_none() + && env_getter.get_env("VSTEL_MSBuildProjectFullPath").is_none() { return None; }