ASP.NET Web应用程序生成的输出 - 如何包括所有部署文件? [英] ASP.NET Web Application Build Output - How do I include all deployment files?

查看:99
本文介绍了ASP.NET Web应用程序生成的输出 - 如何包括所有部署文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我建立我的 ASP.NET 的Web应用程序,我得到一个.dll文件的code表示在其网站(这是很大的),但该网站还需要所有的.aspx文件和朋友,而这些都需要被放置在正确的目录结构。我怎样才能得到这一切都在一个目录下每个构建的结果?尝试选择正确的文件从源目录中是一种痛苦。

When I build my ASP.NET web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How can I get this all in one directory as the result of each build? Trying to pick the right files out of the source directory is a pain.

最终的结果应该是XCOPY部署。

The end result should be xcopy deployable.

更新:我不希望有手动使用发布命令,它我所知道的。我要全套的应用程序能够生成输出所需的文件 - 这意味着我也从运行的 MSBuild的

Update: I don't want to have to manually use the Publish command which I'm aware of. I want the full set of files required by the application to be the build output - this means I also get the full set of files in one place from running MSBuild.

推荐答案

一个解决方案似乎是Web部署项目(WDPS),为Visual Studio(和的MSBuild)提供一个附加的建立一个Web项目的目录和可以选择合并组件和修改web.config文件。构建WDP的输出所需的所有在一个目录部署站点中的文件。

One solution appears to be Web Deployment Projects (WDPs), an add-on for Visual Studio (and msbuild) available that builds a web project to a directory and can optionally merge assemblies and alter the web.config file. The output of building a WDP is all the files necessary to deploy the site in one directory.

有关Web部署项目的更多信息:

More information about Web Deployment Projects:


  1. 上webdevtools MSDN博客公告2008年WDP

  2. ScottGu介绍,2005年WDP

  1. Announcement on webdevtools MSDN blog for WDP 2008
  2. ScottGu introduction to WDP 2005

该解决方案唯一的缺点是一个附加的必须是可用的构建机器上的要求。不过,这是不够好,现在!

The only disadvantage to this solution is the requirement on an add-on which must be available on the build machine. Still, it's good enough for now!

这篇关于ASP.NET Web应用程序生成的输出 - 如何包括所有部署文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆