Warn when enabling Windows.UI.Xaml profile for Windows SDK projections #43039
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.
Follow up to #41936
Summary
Enabling the Windows.UI.Xaml profile is only supported by the .NET 9 SDK (#41936). This PR adds a warning on the .NET 8 SDK to make it clear that that configuration is not supported there. I didn't make it an error because it felt unnecessary to go out of our way to always fail builds in this scenario. People that really wanted to use that can still make it work by manually setting the right value for
WindowsSdkPackageVersion
, and the .NET 8 SDK will pull all available profiles by default. The important part is that the new warning calls out clearly that this configuration is not actually supported.Customer Impact
No impact whatsoever for anyone not explicitly setting
UseUwp
in their projects. If they do set it, they will not get a useful warning, rather than things not working at all. That would've been a very confusing experience if anyone had tried building a UWP for .NET project targeting .NET 8 with the .NET 8 SDK, whereas it would've worked for people with the .NET 9 SDK.Regression?
No, this is to support a new feature in the .NET 9 SDK.
Testing
Tested this locally with a dogfooding build and checking the warning in the output.
Risk
Low. This is just a warning in a new target, that is only enabled when
UseUwp
is explicitly set (and that's a new feature).