Skip to content

Add support for CsWinRT 3.0 multi-targeting via Windows SDK build number #49721

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
11 changes: 11 additions & 0 deletions eng/ManualVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
Basically: In this file, choose the highest version when resolving merge conflicts.
-->
<PropertyGroup>

<!-- CsWinRT 3.0 targeting packs -->
<MicrosoftWindowsSDKNETRef10_0_17763_1PackageVersion>10.0.17763.57</MicrosoftWindowsSDKNETRef10_0_17763_1PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362_1PackageVersion>10.0.18362.57</MicrosoftWindowsSDKNETRef10_0_18362_1PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041_1PackageVersion>10.0.19041.57</MicrosoftWindowsSDKNETRef10_0_19041_1PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_20348_1PackageVersion>10.0.20348.57</MicrosoftWindowsSDKNETRef10_0_20348_1PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22000_1PackageVersion>10.0.22000.57</MicrosoftWindowsSDKNETRef10_0_22000_1PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_22621_1PackageVersion>10.0.22621.57</MicrosoftWindowsSDKNETRef10_0_22621_1PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_26100_1PackageVersion>10.0.26100.57</MicrosoftWindowsSDKNETRef10_0_26100_1PackageVersion>

<!-- CsWinRT 2.x targeting packs-->
<MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>10.0.17763.57</MicrosoftWindowsSDKNETRef10_0_17763PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>10.0.18362.57</MicrosoftWindowsSDKNETRef10_0_18362PackageVersion>
<MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>10.0.19041.57</MicrosoftWindowsSDKNETRef10_0_19041PackageVersion>
Expand Down
17 changes: 15 additions & 2 deletions src/Layout/redist/targets/GenerateBundledVersions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1314,8 +1314,21 @@ Copyright (c) .NET Foundation. All rights reserved.
TargetingPackName="NETStandard.Library.Ref"
TargetingPackVersion="$(NETStandardLibraryRefPackageVersion)"
/>

<!-- Supported Windows versions -->

<!--
Supported Windows versions using CsWinRT 3.0 (.NET 10 is the baseline). This leverages the patch version of
the Windows SDK version to allow multi-targeting, which is required to allow customers to gradually migrate.
Both CsWinRT 3.0 and 2.x will be supported for a period of time, and packages can target both of them.
-->
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.26100.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_26100_1PackageVersion)" MinimumNETVersion="10.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22621.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22621_1PackageVersion)" MinimumNETVersion="10.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22000_1PackageVersion)" MinimumNETVersion="10.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.20348.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_20348_1PackageVersion)" MinimumNETVersion="10.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_19041_1PackageVersion)" MinimumNETVersion="10.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_18362_1PackageVersion)" MinimumNETVersion="10.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_17763_1PackageVersion)" MinimumNETVersion="10.0" />

<!-- Supported Windows versions using CsWinRT 2.x -->
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.26100.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_26100PackageVersion)" MinimumNETVersion="8.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22621.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22621PackageVersion)" MinimumNETVersion="8.0" />
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22000PackageVersion)" MinimumNETVersion="8.0" />
Expand Down
6 changes: 5 additions & 1 deletion src/Tasks/Common/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -995,4 +995,8 @@ You may need to build the project on another operating system or architecture, o
<value>NETSDK1228: This project depends on the Aspire Workload which has been deprecated. Aspire now ships via NuGet packages and no longer requires a workload. Please visit {0} for upgrade guidance.</value>
<comment>{StrBegins="NETSDK1228: "}</comment>
</data>
</root>
<data name="UsingPreviewCsWinRT3_0Feature" xml:space="preserve">
<value>NETSDK1229: Targeting a Windows SDK version with '1' as the revision number will reference CsWinRT 3.0, which is currently in preview. The current project is targeting the Windows SDK version '{0}'. If this is not intended, change the revision number to '0' to use CsWinRT 2.x instead.</value>
<comment>{StrBegins="NETSDK1229: "}</comment>
</data>
</root>
7 changes: 6 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading