简体   繁体   English

将.dll添加到VS 2012安装项目中

[英]Adding .dll to a VS 2012 Setup Project

My project has a .dll as a Reference which is (HtmlAgilityPack) and when i do a Setup Project, it returns an error that 我的项目有一个.dll作为(HtmlAgilityPack)的参考,当我执行安装项目时,它返回一个错误

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'HtmlAgilityPack,
Version=1.4.6.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its   
dependencies. The system cannot find the file specified.

How can i solve this issue ? 我该如何解决这个问题?

You need to make sure that the required DLLs are either already present on the target system or are installed along with your application. 您需要确保所需的DLL已经存在于目标系统上,或者已与您的应用程序一起安装。 This error message means that a required DLL was not found and thus could not be loaded. 此错误消息表示找不到所需的DLL,因此无法加载。

If you use a Visual Studio Setup project to install your application, look under "Dependencies" whether the required DLLs are present and are also included with the setup. 如果您使用Visual Studio安装程序项目来安装应用程序,请在“依赖项”下查看是否存在所需的DLL,并且这些DLL也包含在安装程序中。

If it is only a reference dll and not suppose to be installed then you can just add it to the root of you execution file where yourapplication.exe is available. 如果它只是一个参考dll,而不是假定要安装,则可以将其添加到您的application.exe可用的执行文件的根目录中。

for making it as a single setup file you can get the setup maker of Visual Studio or use other available software. 要将其作为单个安装文件,您可以获取Visual Studio的安装制造商或使用其他可用的软件。

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM