Creating an installation/setup file in Visual studio that requires a certain dll

∥☆過路亽.° 提交于 2019-12-23 00:43:30

问题


I developed a program in Visual Studio 2010 Express edition. I want to create an installation/setup file for the program. The Express edition only allows me to create a “One Click Installer”. The program requires a dll file that must be in the same directory as the exe file of the program to work. However, I am unable to import the dll file as a reference as it generates an error. Therefore, the One Click installation file does not install the program correctly.

Is it possible to force the One click installer to copy that file to the installation directory during the installation process? If not, what other options do I have to create an installation/setup file for my project?

Thanks


回答1:


It is called ClickOnce. Project + Add Existing Item and select that DLL. That adds it to your project. Select it and look in the Properties window. Build Action should be set to "Content", that makes ClickOnce publish it. Copy to Output Directory should be set to "Copy if newer", that ensures that the DLL is copied to your build output directory. What you did by hand previously.



来源:https://stackoverflow.com/questions/4684059/creating-an-installation-setup-file-in-visual-studio-that-requires-a-certain-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!