Visual Studio Web Setup Project - deploy outside of web root (wwwroot)

早过忘川 提交于 2019-12-11 06:24:22

问题


I am working with Visual Studio setup projects to install web application. I am looking for a way to change the default physical file installation path. The end result I would like is a Virtual Directory called "MySite" that points to a local path on the server like "C:\Apps\MySite"

Is there a built-in option to customize this?


回答1:


No, it will install at the physical file installation path of the Web Site where it is installed plus the name of the virtual directory.




回答2:


edit the project file. search for keyword 'virtual' and change the value for virtual directory.




回答3:


You have to do it with a custom action, unfortunately it's not supported as a simple setting in the setup project (as others have mentioned).

Here is an example implementation using custom action:

Allow user to set physical directory path during Web Project deployment (a bit old but can still be useful)



来源:https://stackoverflow.com/questions/1337211/visual-studio-web-setup-project-deploy-outside-of-web-root-wwwroot

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