参考System.Windows.Forms的 [英] Reference to System.Windows.Forms
问题描述
我使用C#到命令在Excel中的东西,但是当我键入
I'm using C# to command something in Excel but when I type
using System.Windows.Forms
它不是由Visual Studio
当我添加了引用的认可,我有这样的错误消息。
it's not recognized by Visual Studio When I added the reference, I have this error message
要'System_Windows_Forms'的引用无法添加。
中的ActiveX类型库'...'是从.NET程序集导出并不能添加作为参考。
添加对.NET程序集,而不是
A reference to 'System_Windows_Forms' could not be added. The ActiveX type library '...' was exported from a .NET assembly and cannot be added as a reference. Add a reference to the .NET assembly instead
你有什么办法呢?
推荐答案
你尝试将其从COM选项卡添加?发现在.NET的标签,而不是System.Windows.Forms.dll的! (按名称排序的DLL-S使得它如此更容易找到合适的人。)
Did you try to add it from the COM-tab? Find the System.Windows.Forms.dll in the .NET-tab instead! (Sorting the dll-s by name makes it so much easier to find the right one.)
这篇关于参考System.Windows.Forms的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!