Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

VS Release instances reject preview SDKs by default, causing MSBuild SDK resolver failures during Helix testing. This backports the fix from #51558 to release/8.0.1xx.

Changes

  • eng/enable-preview-sdks.ps1 (new): Locates VS installations and sets UsePreviews=True in the instance-specific sdk.txt configuration file. Preserves existing settings.

  • build/RunTestsOnHelix.cmd: Invokes the preview SDK enablement script before test execution on Helix machines.

  • eng/common/tools.ps1: Adds null safety to LocateVisualStudio() when global.json lacks a tools.vs section, preventing failures in repositories without VS requirements.

The script targets the VS-versioned LocalAppData directory:

$instanceDir = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\VisualStudio\$vsMajorVersion.0_$vsId"

Resolves #51525 for 8.0.1xx release branch.

Original prompt

This section details on the original issue you should resolve

<issue_title>Backport vs release fix to 8.0.1xx</issue_title>
<issue_description>Please start a PR to backport https://github.com/dotnet/sdk/pull/51558/checks?check_run_id=54843914657 to 8.0.1xx.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Backport release fix to version 8.0.1xx Backport #51558: Fix VS rejecting preview SDKs on Helix test machines Nov 7, 2025
Copilot AI requested a review from nagilson November 7, 2025 23:17
Copilot finished work on behalf of nagilson November 7, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants