Include folder in setup project

余生长醉 提交于 2019-12-18 15:53:32

问题


I want to include a folder in a setup project so that when I deploy that setup the complete folder is also deployed to the install location.


回答1:


Right click the setup project, and select "View" > "File System", and from there you can access a lot of special folders like install folder, appdata, desktop etc, and add files to there, that will be created when you install the application. Make sure to set the "alwayscreate" property to true.




回答2:


The answer is good because it gave me clue on how to fix my problem. I think that my requirement was slightly different. I had to include contents of another library project from the same solution. This seems to work fine for Console Applications/Web Sites, but Installer for some reason was not including it. There might be a better way, but this worked for me. In similar fashion, right click the setup project, and:

- Select "View" > "Custom Actions". 
- Right click on "Install" folder and select "Add Custom Action". 
- Double click on "Application Folder"
- Click on "Add Output..."
- Select the project from the dropdown and in my instance I selected "Content Files", OK it and give it a name. 

This will include any resources, from the selected project marked as Content and that are marked for copying, into your installer.



来源:https://stackoverflow.com/questions/1108840/include-folder-in-setup-project

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