Skip to content

fix: Disable legacy VCLibs/UniversalCRT.Debug SDKReferences in Uno.Sdk WinAppSdk targets - #23174

Merged
MartinZikmund merged 1 commit into
masterfrom
dev/mazi/WinUISDKReferences
May 5, 2026
Merged

MartinZikmund merged 1 commit into
masterfrom
dev/mazi/WinUISDKReferences

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #23173

PR Type:

🐞 Bugfix

What changed? 🚀

Defaults WinUISDKReferences to false in src/Uno.Sdk/targets/Uno.Common.WinAppSdk.targets, alongside the other WinAppSdk-wide defaults.

Microsoft.WinUI.AppX.targets (shipped with the Windows App SDK) injects legacy <SDKReference> items for Microsoft.VCLibs, Microsoft.VCLibs.Desktop, and Microsoft.UniversalCRT.Debug whenever WinUISDKReferences is not explicitly disabled. With Hybrid CRT, these framework package references are no longer required, and they frequently cause build failures such as:

Could not find SDK "Microsoft.UniversalCRT.Debug, Version=10.0.26100.0".

on machines that don't have the matching Universal CRT Debug Extension SDK installed.

The new property is gated with Condition=\" '\$(WinUISDKReferences)' == '' \" so consumers who still need the legacy SDK references can opt back in by setting <WinUISDKReferences>true</WinUISDKReferences> in their project.

The comment in Microsoft.WinUI.AppX.targets itself explicitly documents this opt-out:

apps can still opt out of referencing these FWPs by setting WinUISDKReferences='false'.

PR Checklist ✅

…pSdk

Default WinUISDKReferences to false so WindowsAppSDK's Microsoft.WinUI.AppX.targets
does not inject Microsoft.VCLibs, Microsoft.VCLibs.Desktop, and
Microsoft.UniversalCRT.Debug SDK framework package references, which are no longer
needed (Hybrid CRT) and frequently cause "Could not find SDK" build failures.
Users can still opt back in by setting the property to true.

fixes #23173

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

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 updates Uno.Sdk’s WinAppSDK build targets to explicitly disable legacy SDK framework package references injected by Windows App SDK when WinUISDKReferences is left unset, preventing build failures on machines missing those legacy Extension SDKs.

Changes:

  • Default WinUISDKReferences to false (only when not already set) for WinAppSDK targets.
  • Add an inline comment explaining the rationale (opting out of legacy VCLibs/UniversalCRT.Debug SDK references).

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

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund MartinZikmund added the ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met label May 4, 2026
@MartinZikmund
MartinZikmund merged commit b1999ec into master May 5, 2026
67 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/WinUISDKReferences branch May 5, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable legacy VCLibs/UniversalCRT.Debug SDKReferences in Uno.Sdk WinAppSdk targets

4 participants