Skip to content

Gate NormalizeSdkRootDriveCasing workaround to MSBuild < 18.9 - #17128

Merged
ViktorHofer merged 1 commit into
mainfrom
copilot/condition-target-for-msbuild-workaround
Jul 16, 2026
Merged

ViktorHofer merged 1 commit into
mainfrom
copilot/condition-target-for-msbuild-workaround

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The NormalizeSdkRootDriveCasing workaround compensates for an MSBuild bug fixed in MSBuild 18.9. On newer MSBuild it is dead weight (spins up an extra task host and runs the normalization logic unnecessarily).

Changes

  • Appended $([MSBuild]::VersionLessThan('$(MSBuildVersion)', '18.9')) to the NormalizeSdkRootDriveCasing UsingTask condition.
  • Appended the same version gate to the NormalizeNetCoreSdkRootCasing Target condition.

The workaround now only activates on MSBuild < 18.9; >= 18.9 skips both the task registration and the target.

To double check:

Copilot AI review requested due to automatic review settings July 16, 2026 05:34
Copilot AI removed the request for review from Copilot July 16, 2026 05:34
@ViktorHofer
ViktorHofer marked this pull request as ready for review July 16, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reduces overhead in the Arcade SDK’s MSBuild workaround layer by gating the NormalizeSdkRootDriveCasing workaround to only run on MSBuild versions where the underlying bug still exists (MSBuild < 18.9). This avoids unnecessary task host creation and normalization work on newer MSBuild versions.

Changes:

  • Added an MSBuild version gate ($([MSBuild]::VersionLessThan('$(MSBuildVersion)', '18.9'))) to the NormalizeSdkRootDriveCasing UsingTask condition.
  • Added the same MSBuild version gate to the NormalizeNetCoreSdkRootCasing target condition to ensure the target and task registration stay in sync.
Show a summary per file
File Description
src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets Gates the NetCoreSdkRoot drive-casing workaround so it only activates on MSBuild versions older than 18.9.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@ViktorHofer
ViktorHofer merged commit 39a14d2 into main Jul 16, 2026
11 checks passed
@ViktorHofer
ViktorHofer deleted the copilot/condition-target-for-msbuild-workaround branch July 16, 2026 09:44
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 17, 2026
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.

4 participants