Skip to content

Commit

Permalink
fix finding toolchains when invoked by msbuild (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg authored Sep 6, 2024
1 parent e8b13ba commit e4a1a88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/windows/find_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,10 @@ mod impl_ {
) -> Option<Tool> {
// 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;
}
Expand Down

0 comments on commit e4a1a88

Please sign in to comment.