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

问题描述

我们正在使用VS2012,并有一个解决方案与4个网站项目。我们已将以下MSBuild参数添加到连续集成msbuild参数中:

We are using VS2012 and have a solution with 4 website projects in it. We have added the following MSBuild arguments to our Continuous Integration msbuild arguments:

当我们进行检查并进行连续集成,它将所有4个网站发布到同一目录。我们如何指定哪个项目属于哪个IIS应用程序?

When we do a check in and the continuous integrations runs, it's publishes all 4 websites to the same directory. How do we specify which project belongs to which IIS application?

我们已经尝试将设置移动到csproj,如进行更改后,检查工作,但它没有发布

We have tried moving the settings into the csproj as suggested on How to tell TFS to deploy multiple webapps containing in one solution? After making the changes, the check in worked but it didn't publish.

推荐答案

它部署到同一个网站,因为你传递 DeployIisAppPath

It's deploying to the same site because you are passing DeployIisAppPath in at the command line.

您可以在每个Web应用程序中使用相同的名称创建发布配置文件(例如 Stage.pubxml ),每个包含一个differen DeployIisAppPath 值。部署时,您可以指定 / p:PublishProfile = Stage ,并且将使用该配置文件的设置为每个特定项目

You can create a publish profile in each web application with the same name (eg. Stage.pubxml), each containing a differen DeployIisAppPath value. When you deploy, you can specify /p:PublishProfile=Stage and it will use the settings from that profile for each specific project.

如果您要指定 SkipExtraFilesOnServer MsDeployServiceUrl 命令行,只需将其从您的发布配置文件中删除。

If you want to specify properties like SkipExtraFilesOnServer and MsDeployServiceUrl from the command line, just remove them from your publish profiles.

这篇关于在解决方案中连续部署多个网站项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 03:49