Skip to content

Conversation

@dsplaisted
Copy link
Member

@dsplaisted dsplaisted commented Aug 16, 2022

If there are multiple matching WindowsSdkSupportedTargetPlatformVersion items, choose the one with the highest minimum version. That way it is possible to use older packages when targeting older versions of .NET, and newer packages for newer versions of .NET.

Alternate implementation for #27179, and targeting release/6.0.4xx branch instead of main.

Description

The Windows SDK projection package included by the .NET SDK has been shipped as .NET 5 binaries up until now. The Windows SDK projection package is going to start shipping .NET 6 binaries, but right now the .NET SDK uses the same version of the package for all .NET TFMs (.NET 5, 6, 7, etc.). Given someone can use the .NET 6 SDK to still target .NET 5, this can cause issues. Due to this, this change allows to lock the version of the Windows SDK projection package used for .NET 5 while allowing for the version used for later TFMs to still be updated.

Customer Impact

Enlighten the .NET SDK to the different Windows SDK packages so customers do not experience build failures when targeting net5 with .NET 6 or later SDK.

Regression

No

Risk

Low. We added some locked (constant) versions for the .NET 5 packages, and added a few lines of code to the SDK to pick the package version where constraints on the target framework version are met.

Testing

The test for this (included in change) is a test app that targets .NET 6 and .NET 5. we see that in the case of .NET 6 we get the latest Windows SDK package version, and in the case of .NET 5 the last known good version of the Windows SDK package is used.

…rameworks

If there are multiple matching WindowsSdkSupportedTargetPlatformVersion
items, choose the one with the highest minimum version.  That way it is
possible to use older packages when targeting older versions of .NET,
and newer packages for newer versions of .NET
@ghost
Copy link

ghost commented Aug 16, 2022

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@dsplaisted dsplaisted requested review from a team and j0shuams August 16, 2022 14:54
@dsplaisted dsplaisted marked this pull request as ready for review August 16, 2022 14:54
Copy link
Contributor

@j0shuams j0shuams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbhanda rbhanda added this to the 6.0.401 milestone Aug 16, 2022
@marcpopMSFT marcpopMSFT merged commit 5b0d7b4 into dotnet:release/6.0.4xx Aug 16, 2022
dsplaisted added a commit to dsplaisted/sdk that referenced this pull request Nov 10, 2022
This broke with changes related to dotnet#27199.
It's now possible to have multiple supported platform version items for the
same version.
dsplaisted added a commit to dsplaisted/sdk that referenced this pull request Nov 10, 2022
This broke with changes related to dotnet#27199.
It's now possible to have multiple supported platform version items for the
same version.
dsplaisted added a commit to dsplaisted/sdk that referenced this pull request Nov 11, 2022
This broke with changes related to dotnet#27199.
It's now possible to have multiple supported platform version items for the
same version.
dsplaisted added a commit to dsplaisted/sdk that referenced this pull request Nov 14, 2022
This broke with changes related to dotnet#27199.
It's now possible to have multiple supported platform version items for the
same version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants