-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support different Windows SDK package versions for different target frameworks #27199
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
Merged
marcpopMSFT
merged 3 commits into
dotnet:release/6.0.4xx
from
dsplaisted:windows-sdk-version
Aug 16, 2022
Merged
Support different Windows SDK package versions for different target frameworks #27199
marcpopMSFT
merged 3 commits into
dotnet:release/6.0.4xx
from
dsplaisted:windows-sdk-version
Aug 16, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
|
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. |
j0shuams
approved these changes
Aug 16, 2022
Contributor
j0shuams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
j0shuams
reviewed
Aug 16, 2022
src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs
Show resolved
Hide resolved
manodasanW
reviewed
Aug 16, 2022
src/Tasks/Microsoft.NET.Build.Tasks/CreateWindowsSdkKnownFrameworkReferences.cs
Outdated
Show resolved
Hide resolved
manodasanW
approved these changes
Aug 16, 2022
This was referenced 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.