dotnet / windowsdesktop

MIT License
161 stars 53 forks source link

Some of profile attribute on files in windows desktop runtime pack are wrong #4708

Open ThomasGoulet73 opened 2 weeks ago

ThomasGoulet73 commented 2 weeks ago

Description

Some of the files tagged as WinForms and WPF in dotnet/windowsdesktop#4227 are wrong, these are all WPF specific and are not used by WinForms: https://github.com/dotnet/windowsdesktop/blob/64fd8335accddc235ce69cd8403febf5a769eef6/src/windowsdesktop/src/sfx/Microsoft.WindowsDesktop.App.Runtime.sfxproj#L15-L25

The .resources.dll files in this bloc are tagged as WPF and WinForms when the regular dll is tagged as WPF only. Which means that in the publish you get the .resources.dll file without the matching .dll file.

For WindowsFormsIntegration.resources.dll it's unclear because the regular dll file is tagged as WPF and WinForms when AFAIK it shouldn't be used when it's WinForms only: https://github.com/dotnet/windowsdesktop/blob/64fd8335accddc235ce69cd8403febf5a769eef6/src/windowsdesktop/src/sfx/Directory.Build.props#L59

If I do the steps to reproduce in the issue dotnet/sdk#37088, I get those files in the output when they shouldn't be used at runtime.

/cc @LakshanF since you were the one to add the file.

RussKie commented 1 week ago

The change to how Windows Forms classifications are references was made incorrectly too: https://github.com/dotnet/windowsdesktop/pull/4227/files#r1791003324, and that should be rectified.