Skip to content

Cleanup the init-vs-env.cmd script #115538

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

Merged
merged 1 commit into from
May 14, 2025

Conversation

jkoritzinsky
Copy link
Member

Use the already-present VisualStudioVersion environment variable and remove unnecessary arguments to the MSBuild generators.

…remove unnecessary arguments to the MSBuild generators
@Copilot Copilot AI review requested due to automatic review settings May 13, 2025 23:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR cleans up the build scripts by unifying the Visual Studio version variable usage and removing unnecessary generator arguments. Key changes include:

  • Replacing the custom __VSVersion variable with the standardized VisualStudioVersion for MSBuild generator calls.
  • Removing superfluous generator argument settings in some scripts.
  • Updating version comparisons in gen-buildsys.cmd to match the new convention.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tests/build.cmd Updated call to gen-buildsys.cmd to pass VisualStudioVersion.
src/native/libs/build-native.cmd Replaced __VSVersion with VisualStudioVersion in build call.
src/native/corehost/build.cmd Updated echo and call commands to use VisualStudioVersion.
src/coreclr/build-runtime.cmd Consistently substituted __VSVersion with VisualStudioVersion.
eng/native/init-vs-env.cmd Removed redundant Visual Studio version conditionals.
eng/native/gen-buildsys.cmd Adjusted version check to compare against "17.0".

Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants