-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fix Profiles Attributes for Ref/Runtime Pack #4788
Conversation
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.
Thanks!
@@ -41,24 +35,34 @@ | |||
<FrameworkListFileClass Include="System.Windows.Forms.Design.resources.dll" Profile="WindowsForms" /> | |||
<FrameworkListFileClass Include="System.Windows.Forms.Primitives.resources.dll" Profile="WindowsForms" /> | |||
<FrameworkListFileClass Include="System.Windows.Forms.resources.dll" Profile="WindowsForms" /> | |||
<FrameworkListFileClass Include="System.Windows.Input.Manipulations.resources.dll" Profile="WindowsForms" /> | |||
<FrameworkListFileClass Include="System.Private.Windows.Core.dll" Profile="WindowsForms" /> |
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.
As I noted in #4227 (review) this is the wrong way of doing this, Windows Forms owns the list, and it should be coming from dotnet/winforms instead of being manually maintained here.
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.
Yes, this is what #4796 describes. Currently https://github.com/dotnet/winforms/blob/main/pkg/Microsoft.Private.Winforms/sdk/dotnet-windowsdesktop/System.Windows.Forms.FileClassification.props is only for the ref pack, we'll need to make adjustments to have it also be used for the runtime pack here.
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