如何将自定义文件包含到 ASP.NET MVC 3 项目的部署包中
我们正在使用 msdeploy(来自 VS 2010)来构建 Web 项目的部署包。问题是我们想要包含我们的自定义文件(对于本场景,它是 app_config.htm “模板”文件,将用于维护模式)到该包中。
是否可以以某种方式将此类自定义文件包含到部署包中?
在项目属性中,Package/Publish web
部分 -> 要部署的项目
我们更喜欢选项仅运行此应用程序所需的文件
。我们不想仅仅因为我们想要其中包含这个文件(app_offline.html.template)而包含所有文件。
在这里找到编辑解决方案:如何使用 VS2010 Web 部署包包含其他文件?
We are using msdeploy (from VS 2010) to build deployment package of our web project. The problem is that we'd like to include our custom file (for this scenario it is app_config.htm "template" file which will be used for maintenance mode) into that package.
Is it somehow possible to include such kind of custom file into the deployment package ??
In the project properties, section Package/Publish web
-> Items to deploy
we prefer the option Only files needed to run this application
. We don't want to include all files only because of this one (app_offline.html.template) we want to have there.
EDIT solution found here: How do you include additional files using VS2010 web deployment packages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以查看KwateeSDCM。它有一个非常好的机制来覆盖标准包(Web 应用程序)文件,其版本可以根据目标服务器和/或版本进行自定义。
You could have a look at KwateeSDCM. It's got a pretty good mechanism for overriding standard package (web applications) files with versions that can be customized according to the target server and/or version.