From 549d17927c80880ea4a1f3cf971314210728d550 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 22 May 2025 09:04:35 +0000
Subject: [PATCH 1/4] Initial plan for issue
From bc1a19c290924e61a75bd80db57f650ab26656ca Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 22 May 2025 09:16:17 +0000
Subject: [PATCH 2/4] Implement automatic WindowsSdkPackageVersion setting and
TFM validation
Co-authored-by: LegendaryBlair <122517415+LegendaryBlair@users.noreply.github.com>
---
...WindowsAppSDK.CsWinRTCompatibility.targets | 34 +++++++++++++++++++
...Microsoft.WindowsAppSDK.Foundation.targets | 3 ++
2 files changed, 37 insertions(+)
create mode 100644 build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets b/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
new file mode 100644
index 0000000000..f82bcdb075
--- /dev/null
+++ b/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+ 6.0.0
+
+
+
+
+
+ 10.0.17763.38
+
+
+
+
+
+ <_HasWindowsTFM>false
+ <_HasWindowsTFM Condition="$(TargetFramework.Contains('-windows'))">true
+
+
+
+
+
\ No newline at end of file
diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets b/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets
index 925af86b05..32e803437a 100644
--- a/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets
+++ b/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets
@@ -16,6 +16,9 @@
+
+
+
From 6bdd7f04ba342d4b2af662ac5c2a423aea4141e1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 22 May 2025 09:17:22 +0000
Subject: [PATCH 3/4] Add detailed documentation to CsWinRTCompatibility
targets
Co-authored-by: LegendaryBlair <122517415+LegendaryBlair@users.noreply.github.com>
---
...icrosoft.WindowsAppSDK.CsWinRTCompatibility.targets | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets b/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
index f82bcdb075..27fc396f31 100644
--- a/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
+++ b/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
@@ -4,6 +4,16 @@
From 3dab5811490073f4e2c978c7ed0de4b39a693be1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 23 May 2025 03:37:32 +0000
Subject: [PATCH 4/4] Update CsWinRTCompatibility targets to use dynamic
WindowsSdkPackageVersion
Co-authored-by: LegendaryBlair <122517415+LegendaryBlair@users.noreply.github.com>
---
...soft.WindowsAppSDK.CsWinRTCompatibility.targets | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets b/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
index 27fc396f31..4f41ad4c65 100644
--- a/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
+++ b/build/NuSpecs/Microsoft.WindowsAppSDK.CsWinRTCompatibility.targets
@@ -14,6 +14,10 @@
This file automatically sets WindowsSdkPackageVersion to the appropriate value for compatibility with
Windows App SDK 1.6+, eliminating the need for manual project edits.
+
+ The default is constructed from two properties that can be overridden:
+ - WindowsAppSDKDefaultSdkVersion: The base Windows SDK version (default: 10.0.17763)
+ - WindowsAppSDKCsWinRTProjectionVersion: The projection version suffix (default: from CsWinRTDependencyWindowsSdkVersionSuffixPackageVersion or 38 as fallback)
-->
@@ -25,9 +29,17 @@
Set default WindowsSdkPackageVersion if not already specified.
This is specifically needed for AOT compatibility between Windows App SDK 1.6+ and Windows SDK.
-->
+
+
+ 10.0.17763
+ $(CsWinRTDependencyWindowsSdkVersionSuffixPackageVersion)
+
+ 38
+
+
- 10.0.17763.38
+ $(WindowsAppSDKDefaultSdkVersion).$(WindowsAppSDKCsWinRTProjectionVersion)