installer icon indicating copy to clipboard operation
installer copied to clipboard

Include Windows compatibility pack in .NET Desktop Runtime 5.0.0

Open rbqm opened this issue 6 years ago • 4 comments

I have ported my WPF application to .NET 5 using net50-windows. The build succeeds without warnings or errors. When running the application, however, one of the DLLs my application uses fails because it cannot find assembly "System.ComponentModel.Composition.dll". I have fixed the issue by including the Windows compatibility pack (https://www.nuget.org/packages/Microsoft.Windows.Compatibility, version 5.0.0) but I'm surprised this is needed when I'm explicitly targeting net50-windows. Why are the Microsoft.Windows.Compatibility assemblies not included in .NET 5.0.0 Desktop runtime?

rbqm avatar Nov 19 '20 09:11 rbqm

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

Dotnet-GitSync-Bot avatar Nov 19 '20 09:11 Dotnet-GitSync-Bot

Surely you mean @rbqm that only relevent assemblies (such as System.ComponentModel.Composition.dll9 should be moved into the Desktop pack?

JensNordenbro avatar Feb 01 '21 10:02 JensNordenbro

Why are the Microsoft.Windows.Compatibility assemblies not included in .NET 5.0.0 Desktop runtime?

Because not every app needs them? They are legacy API's. Most apps works just fine without Microsoft.Windows.Compatibility pack.

tomrus88 avatar Mar 05 '21 19:03 tomrus88

Old issue triage: It looks like you found the recommended workaround of using the compatibility pack.

marcpopMSFT avatar May 21 '24 20:05 marcpopMSFT