第三方类未在“using”中加载。附加类安装在哪里?
我安装了第三方库,但找不到附带的命名空间。
The type or namespace name 'Maverick' could not be found (are you missing a using directive or an assembly reference?)
很公平,VS 2010 找不到它。但是我的系统在哪里寻找第三方库呢?我可以修改位置列表吗?
I have a third party library installed, but the accompanying namespace isn't found.
The type or namespace name 'Maverick' could not be found (are you missing a using directive or an assembly reference?)
Fair enough, VS 2010 can't find it. But where does my system look for third party libraries? Can I modify the list of locations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
using
不会导致库被加载或引用。它仅使该名称空间中的类可以在没有名称空间前缀的情况下使用。在使用库之前,您需要在项目中引用它。转到“项目”菜单并选择“添加引用...”,从该对话框中您可以选择已安装在 GAC 中的库,可以浏览到显式 DLL,也可以在解决方案中引用另一个项目。
using
does not cause a library to be loaded or referenced. It only makes the classes in that namespace available for use without their namespace prefix.Before you can use a library, you need to reference it in your project. Go to the Project menu and choose Add Reference... From that dialog box you can choose libraries that have been installed in the GAC, you can browse to an explicit DLL, or you can reference another project in your solution.
该框架在 GAC 和 bin 文件夹中查找库。无论哪种方式,您都需要在项目中添加对库的引用
The framework looks for Libraries in GAC and The bin folder. Either way you need to add a reference to the library in your project
您是否在 Visual Studio 项目中添加了对程序集的引用?我还没有使用过 VS 2010,在 2008/5 中,您可以在解决方案资源管理器中转到项目的参考部分,然后右键单击并选择添加参考。然后您可以选择装配的位置。
Have you added a reference to the assembly in your visual studio project? I haven't used VS 2010, in 2008/5 you go to the references section of your project in solution explorer and right click and select add reference. You can then chose the location of the assembly.