How to add a reference to the System.Windows.Forms lib from a .NET Core WPF project

preview_player
Показать описание
In this video, I’ll show you how to add a reference to the System.Windows.Forms library from a .NET Core WPF project. Usually, it is very easy to add a reference to the System.Windows.Forms library from a .NET Framework WPF project. But, when it comes to a .NET Core WPF project this is how it is done.

Happy coding.

My website

Apps I’ve created for Android and Windows, please give a try
------------------------------------------------------------------------
RSS Feed Fetcher (RSS feed reader for Windows)

RSS Feed Fetcher (RSS feed reader for Android)

Podcast Fetcher (Podcast player for Windows)

Podcast Fetcher Lite (Free podcast player for Windows)

Battery Level Alarm (Battery app for Windows)

Audio Credits
––––––––––––––––––––––––––––––
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

Short, sweet, and to the point. And best of all, it works, even 3 years later. Thank you.

emulationemperor
Автор

Thank you thousand times!! Searched for so long and did not find anything....

ebvsou
Автор

thank you SO much! i was scouring the internet to find out why referencing wasnt working and all i got was "jUsT rIGhT CLicK aDd ReFERanCe" you really helped me out.

blargminton
Автор

you saved my life finally after three hours of searching i found a solution

elmetiu
Автор

Just an update to this - VS 2022 (maybe earlier) now has a checkbox for "Enable Windows Forms for this project" on the Properties panel. Just need to check that instead.

wolf
Автор

Goodness mee.... thanks so much bro! I ticked the 2 windows_forms dependencies but now I know these are the wrong one LOL!

samitechcookie
Автор

amazing hope it not destroy other part of the project amazing simple video

mahdimdh
Автор

Thank you so much, you help me with my project

rithsovannak
Автор

how can this be so simple to install/use, but that hard to find ?

XKamKaZRuSh
Автор

it not work for me with .net 6 Blazor server project

nguyenducduy
Автор

Thanks Kareem, It seems straight forward simple but it did not work for my console application in dot net core 3.1. Is this for desktop applications only?

ibrahimuye
Автор

If still not working, make sure to double click the solution to access the ".csproj" file and change

to

kuzco