问题
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