添加一个DLL [英] adding a dll

查看:79
本文介绍了添加一个DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在尝试在我的.net项目中添加一个dll。


我已经通过浏览添加了对dll(来自.net项目)的引用,虽然dll的名称显示在引用下没有类,但我不能使用它的任何方法。我不确定我是否正确添加dll。你能否告诉我我做错了什么以及如何成功地将这个dll添加到我的项目中。


提前谢谢:) !!!

解决方案

您是否添加了命名空间?

如果dll项目与当前项目位于同一解决方案中,请转到添加引用。有一个项目选项卡

否则你会去.net标签浏览它(我相信这就是你所说的)


如果右键单击解决方案资源管理器中的dll并在对象浏览器中选择了视图,那里有什么?它使用什么命名空间?什么类名?


你好!你似乎真的回答了我的问题,非常感谢!


当我右键单击dll并在对象浏览器中选择视图时,我会看到我的dll名称,如果我打开它那里的课程。这是否意味着我应该能够引用它们?从我对vb.net的一点点使用中我注意到,只要你把一个句点(。)设置为你通常出现的方法名称,但dll中没有一个方法可以显示。


< blockquote>那么你的dll可能会有一个与你当前项目不同的命名空间。

如果你的dll被称为mydll.dll然后命名空间可能是mydll


所以你会使用类似的东西:

展开 | 选择 | 换行 | 行号


Hi All,

I am trying to add a dll to my .net project.

I have added a reference to the dll(from .net project) through browse and although the name of the dll shows up under references none of the classes are there and i am not able to use any of the methods from it. I am not sure if i am adding the dll correctly. Could you please advise on what i am doing incorrectly and how to sucessful add this dll to my project.

Thanks in advance :) !!!

解决方案

Have you added the namespace?

If the dll project is in the same solution as your current project, going to "add a reference" there is a tab for "projects"
Otherwise you would go to the .net tab and browse for it (I believe that is what you said)

If you right click on your dll in the solution explorer and chose view in object browser, what is in there? What namespace does it use? What class names?


Hi there! u really seem to be answering my question, very much appreciated!

When i right click on the dll and choose view in object browser i see my dll name and if i open it under all the classes r there. Does that mean i should be able to reference them? From my little use of vb.net i have noticed that as soon as u put a period (.) the method names avaible to u usually show up but none of the methods from the dll do.


Well your dll will probably have a different namespace then your current project.
if your dll is called "mydll.dll" then the namespace is probably "mydll"

So you would use something like:

Expand|Select|Wrap|Line Numbers


这篇关于添加一个DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆