引用在C#中一个DLL [英] Referencing a dll in C#
问题描述
当我在C#参考一个DLL,它有我的本地路径。所以,当我在另一台计算机上运行它,它不能找到它。我如何添加一个dll所以不希望在我的本地文件夹?
When I reference a dll in c#, it has my local path. So when I run it on another computer it can't find it. How can I add a dll so it isn't looking in my local folder?
当我在另一台计算机上运行我的程序它说找不到命名空间,是你缺少using指令或程序集引用吗?
When I run my program on another computer it says "can't find namespace, are you missing a using directive or assembly reference?"
我必须使用Google错键的话,因为我找不到任何地方吧。
I must be googling the wrong key words because I couldn't find it anywhere.
推荐答案
右键点击它在引用区域,进入属性,然后设置复制本地设置为True。这将DLL复制到您的输出/ bin文件夹分配和应该解决无DLL的机器上的依赖。
Right click on it in the References area, go to properties, and set "Copy Local" to True. This will copy the dll into your output/bin folder for distribution and should solve the dependency on a machine without the DLL.
这篇关于引用在C#中一个DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!