Skip to content

vcbuild.bat fails for Visual Studio 2019 if VCINSTALLDIR intentionally pre-defined #35856

Closed
@bingenito

Description

@bingenito
  • Version: Found when internally onboarding now active LTS 14.x
  • Platform: windows
  • Subsystem: build

What steps will reproduce the bug?

We have a build environment that does not have any Visual Studio installed. As part of bootstrapping vcbuild we explicitly set paths to build tooling as well as locally nuget install other required packages into the build directory. The change in PR #30119 causes VS version detection to now fail because VCINSTALLDIR which we are explicitly setting based on our environment is being cleared.

What is the expected behavior?

If you run "vcbuild vs2019 ..." it doesn't try and fall through to detect vs2017 since a specific version was requested so nothing needs to be cleared for that detection to work.

Additional information

Suggested fix is that if target_env is defined and is "vs2019" then do not clear VCINSTALLDIR. I can create the pull request if it seems like the right direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions