WebDeploy 部署多个网站 [英] WebDeploy to deploy multiple web sites

查看:41
本文介绍了WebDeploy 部署多个网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用此过程来使用 WebDeploy 来部署和编译作为解决方案一部分的两个网站.我们采用的方法在这里找到:

We're using this process to use WebDeploy to deploy and compile two web sites that are a part of the solution. The approach we took was found here:

http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html

但它只是部署其中一个网站;有没有办法让它同时发布?

But it's only deploying one of the web sites; is there a way to tell it to publish both?

谢谢.

推荐答案

基于上述演练(即通过 VS 2010 及其衍生产品,如 TFS 等)创建的 Web 包只能包含一个 Web 项目.不幸的是,VS 生成的 Web 包将受到这个意义上的限制.如果您直接使用 Web Deploy (MSDeploy) EXE 或 API,那么您可以在 IIS 等中打包多个网站.我相信您正在尝试通过 Team Build 来实现这一点,因此这不是一个真正的选择.

Web Packages created based on the above walkthrough (i.e. via VS 2010 and its derivatives like TFS etc) can only contain one web project. Unfortunately VS generated Web Packages will be limited from this sense. If you use Web Deploy (MSDeploy) EXE or API directly and then you can package more than one web site within IIS etc. I believe you are trying to accomplish this via Team Build so that is not really an option.

虽然,在 Team Build 中,您可以创建多个构建定义以创建多个包.您还可以在 .csproj 或 .vbproj 文件中设置属性(与演练步骤 10 中提到的属性相同).如果多个项目的属性 DeployOnBuild 设置为 true,那么在 TFS 中的单个解决方案构建中,您可以生成多个 Web 包.您仍然必须独立部署每个 Web.希望这有帮助

Although, in Team Build you can create more than one build definitions to cause multiple packages to be created. You can also set properties in your .csproj or .vbproj file (same properties mentioned in Step10 of the walkthrough). If more than one project have properties DeployOnBuild set to be true then from within single solution build within TFS you can have multiple web packages generated. You will still have to deploy each web independently. Hope this helps

这篇关于WebDeploy 部署多个网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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