在项目中提供外部dll文件引用时,是否需要在项目设置中包含该文件? [英] When giving external dll file reference in project, Is it needed to include that file in setup of project?

查看:100
本文介绍了在项目中提供外部dll文件引用时,是否需要在项目设置中包含该文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想问一个简单的问题,我从网上下载了Nini.dll文件,并提供了我的项目参考。现在它在我的项目中完美运行,但现在我想在另一台PC上安装我的项目。那么这个文件也可以在另一个系统中运行吗?



请尽快回答我,

谢谢大家!

I just want to ask simple question , I downloaded Nini.dll file from internet and I give its reference to my project . Now its working perfect in my project but now I want to install my project in another PC . So is this file working in another system as well ?

Please answer me as soon as possible ,
Thanks everyone!

推荐答案

是的,您将提交dll以及包。默认情况下,dll不会嵌入可执行文件中,因为它会真诚地扼杀 动态链接库 [ ^ ]。它们与您的可执行文件动态链接,这就是为什么它们需要可用,否则您的应用程序将终止意外



当你为您的项目创建包,Visual Studio会自动为您设置所有内容。第三方DLL将添加到包中(不是可执行文件!),用户需要将它们放在可执行文件所在的同一文件夹中。 .NET也有DLL,但是你不会传输这些DLL,因为.NET框架希望客户端安装框架。一旦安装了框架,DLL就已经可用,因此将它们与包一起发送将没有任何意义。但是,第三方库可能可用,也可能不可用,这就是为什么系统会将它们与可执行文件分开。



请阅读上面提供的DLL文档资源,以了解有关使用DLL的更多信息。
Yes, you are going to submit the dll along with the package. The dll won't be embedded in the executable by default, because it would sincerely kill the purpose of "Dynamic-link library[^]". They are linked to your executable dynamically, that is why they need to be available otherwise your application would terminate "unexpectedly".

When you create the package for your project, Visual Studio would automatically set up everything for you. Third-party DLLs would be added to the package (not the executable!) and user needs to have them on the same folder that the executable is present. .NET also has DLLs, but you do not transfer those DLLs because .NET framework expects the client to have framework installed. Once framework is installed, DLLs are already available, so sending them along with the package won't make any sense. But, third-party libraries may or may not be available, that is why, system would parcel them with the executable.

Please read the documentation resource provided above for DLL to learn more about using the DLLs.


这篇关于在项目中提供外部dll文件引用时,是否需要在项目设置中包含该文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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