Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e61f87b

Browse files
authored
Support CsWinRT 3.0 multi-targeting and WindowsSdkPackageMinimumRevision (#50264)
2 parents a0e922e + 670d7fc commit e61f87b

27 files changed

+580
-209
lines changed

src/Layout/redist/targets/GenerateBundledVersions.targets

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,20 @@ Copyright (c) .NET Foundation. All rights reserved.
13171317
TargetingPackVersion="$(NETStandardLibraryRefPackageVersion)"
13181318
/>
13191319
1320-
<!-- Supported Windows versions -->
1320+
<!--
1321+
Supported Windows versions using CsWinRT 3.0 (.NET 10 is the baseline). This leverages the revision of
1322+
the Windows SDK version to allow multi-targeting, which is required to allow customers to gradually migrate.
1323+
Both CsWinRT 3.0 and 2.x will be supported for a period of time, and packages can target both of them.
1324+
-->
1325+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.26100.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_26100PackageVersion)" MinimumNETVersion="10.0" />
1326+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22621.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22621PackageVersion)" MinimumNETVersion="10.0" />
1327+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22000PackageVersion)" MinimumNETVersion="10.0" />
1328+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.20348.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_20348PackageVersion)" MinimumNETVersion="10.0" />
1329+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.19041.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_19041PackageVersion)" MinimumNETVersion="10.0" />
1330+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.18362.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_18362PackageVersion)" MinimumNETVersion="10.0" />
1331+
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.17763.1" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_17763PackageVersion)" MinimumNETVersion="10.0" />
1332+
1333+
<!-- Supported Windows versions using CsWinRT 2.x -->
13211334
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.26100.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_26100PackageVersion)" MinimumNETVersion="8.0" />
13221335
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22621.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22621PackageVersion)" MinimumNETVersion="8.0" />
13231336
<WindowsSdkSupportedTargetPlatformVersion Include="10.0.22000.0" WindowsSdkPackageVersion="$(MicrosoftWindowsSDKNETRef10_0_22000PackageVersion)" MinimumNETVersion="8.0" />

src/Layout/redist/targets/OverlaySdkOnLKG.targets

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@
3737
UseHardLinksIfPossible="true" />
3838

3939
<OverrideAndCreateBundledNETCoreAppPackageVersion
40-
Stage0MicrosoftNETCoreAppRefPackageVersionPath="$(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/Microsoft.NETCoreSdk.BundledVersions.props"
41-
MicrosoftNETCoreAppRefPackageVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
42-
NewSDKVersion="$(Version)"
43-
TargetRid="$(TargetRid)"
44-
OutputPath="$(TestHostDotNetRoot)/sdk/$(Version)/Microsoft.NETCoreSdk.BundledVersions.props"/>
40+
Stage0BundledVersionsPath="$(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/Microsoft.NETCoreSdk.BundledVersions.props"
41+
Stage2BundledVersionsPath="$(TestHostDotNetRoot)/sdk/$(Version)/Microsoft.NETCoreSdk.BundledVersions.props"/>
4542
</Target>
4643

4744
<Target Name="PublishTestWorkloads"

src/Tasks/Common/Resources/Strings.resx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,6 @@ You may need to build the project on another operating system or architecture, o
982982
<value>NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish.</value>
983983
<comment>{StrBegins="NETSDK1225: "}</comment>
984984
</data>
985-
<!-- The latest message added is PrunePackageDataNotFound. Please update this value with each PR to catch parallel PRs both adding a new message -->
986985
<data name="PrunePackageDataNotFound" xml:space="preserve">
987986
<value>NETSDK1226: Prune Package data not found {0} {1} {2}. To ignore this error, set the AllowMissingPrunePackageData to true.</value>
988987
<comment>{StrBegins="NETSDK1226: "}</comment>
@@ -995,4 +994,13 @@ You may need to build the project on another operating system or architecture, o
995994
<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>
996995
<comment>{StrBegins="NETSDK1228: "}</comment>
997996
</data>
997+
<data name="UsingPreviewCsWinRT3_0Feature" xml:space="preserve">
998+
<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>
999+
<comment>{StrBegins="NETSDK1229: "}</comment>
1000+
</data>
1001+
<data name="CantSpecifyBothProperties" xml:space="preserve">
1002+
<value>NETSDK1230: The {0} and {1} properties cannot both be specified. Remove one or the other.</value>
1003+
<comment>{StrBegins="NETSDK1230: "}</comment>
1004+
</data>
1005+
<!-- The latest message added is CantSpecifyBothProperties. Please update this value with each PR to catch parallel PRs both adding a new message -->
9981006
</root>

src/Tasks/Common/Resources/xlf/Strings.cs.xlf

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Tasks/Common/Resources/xlf/Strings.de.xlf

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Tasks/Common/Resources/xlf/Strings.es.xlf

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Tasks/Common/Resources/xlf/Strings.fr.xlf

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)