Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is System.Windows.Forms assembly

I have Visual Studio 2019, and an empty .net framework project. I would like to build a windows forms project by code only (without using any template).

For this goal I need System.Windows.Forms assembly:

Right click on the project --> Add --> Reference --> COM ---->Where is that assembly?

p.s There is something which is called System_windows_forms ('-' instead of '.'), and this is not what I'm looking for.

like image 739
S Itzik Avatar asked Mar 20 '26 13:03

S Itzik


1 Answers

Add -> Reference -> Assemblies: Framework

System.Windows.Forms is part of the .NET Framework and is installed in the Global Assembly Cache (GAC). Visual Studio will find the reference without you having to look for the location. Where exactly the assembly is located is a complicated story, since you are actually referencing a 'Reference Assembly' that is related to the framework version you are targeting, and live under the Visual Studio install path. At runtime, the assembly in the GAC will be used. The GAC is a directory under C:\Windows\Microsoft.NET,

like image 113
Govert Avatar answered Mar 23 '26 02:03

Govert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!