Continuous deployment with multiple website projects in solution

浪子不回头ぞ 提交于 2019-12-04 21:51:53

问题


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:

/p:DeployOnBuild=True /P:Configuration=Testing /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=WMSvc /p:CreatePackageOnPublish=False /p:DeployIisAppPath="{test}" /p:SkipExtraFilesOnServer=true /p:MsDeployServiceUrl={test}/MsDeploy.axd /P:AllowUntrustedCertificate=True /p:username={username}/p:password={password}

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?

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.


回答1:


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

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.

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



来源:https://stackoverflow.com/questions/14814644/continuous-deployment-with-multiple-website-projects-in-solution

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