Link to System.Windows.Forms

I use C # for a command in Excel, but when I type

using System.Windows.Forms 

it is not recognized by Visual Studio. When I added the link, I have this error message.

Link to "System_Windows_Forms" cannot be added. The ActiveX type library '...' was exported from the .NET assembly and cannot be added as a reference. Add a reference to the .NET assembly instead

Do you have any solutions?

+6
source share
1 answer

Have you tried adding it from the COM tab? Find System.Windows.Forms.dll in the .NET tab instead! (Sorting dll-s by name greatly simplifies finding the right one.)

+18
source

Source: https://habr.com/ru/post/887124/


All Articles