Fix Profiles Attributes for Ref/Runtime Pack #4788
Merged
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.
Related: #4708, #4789
In the ref pack
WindowsFormsIntegration
has profile WinForms and WPF when it should only be there when no profile is specified i.e. bothUseWindowsForms
andUseWPF
is true as indicated in https://github.com/dotnet/wpf/blob/bbfc24fd13804a191e20064acd599b0a359092df/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props#L45-L46. This is causing issues starting in .NET 9 where when<FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" />
is added to winUI app, it is trying to pull in System.Xaml even though WinForms doesn't reference xaml. In .NET 8 there was no profile attribute so updated to remove profile attribute here.In the runtime pack a majority of the
FrameworkListFileClass
with profile for WPF and WinForms is WPF specific. Updated these to be WPF only.Validation:
UseWPF
andUseWindowsForms
both true) runs as expected with manual changes to FrameworkList.xml/RuntimeList.xmlUseWPF
andUseWindowsForms
both true) and produced .exe runs as expected with manual changes to FrameworkList.xml/RuntimeList.xml