How to reference System.Windows.Forms in .NET Core 3.0 for WPF apps?

And this is how to reference System.Windows.Forms in .NET 5.0 for WPF apps and WindowsForms


Looks like it already exists:

For other porting issues, you might want to use the Windows Compatibility Pack which is used to help port apps to .NET Core

There also might be some more information out there related to WPF and this issue, since it's been around for awhile. This might be helpful Select folder dialog WPF, and updated for .NET Core.

Good luck with your upgrade!

You need to add to csproj an additional switch:


Add it below UseWpf. Then try rebuild. After this, you should be able to use Forms namespace.