使用Git部署到Azure中不能部署从多项目解决方案正确的网站 [英] Can't deploy correct website from multi project solution using Git deployment to Azure

查看:467
本文介绍了使用Git部署到Azure中不能部署从多项目解决方案正确的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有具有MVC网站(WebApplication1)是依赖于在溶液中(WebAppCore)另一个项目中的溶液。该人士是在Visual Studio的混帐在线托管。我配置了一个持续集成。一切都建立正常,但当部署时,它部署WebAppCore。据我了解,这是预期的行为,因为这是在解决方案中的第一个项目。我希望它部署WebApplication1。

I have a solution that has a mvc website (WebApplication1) that is dependent on another project in the solution (WebAppCore). The source is hosted in git on Visual Studio Online. I configured a Continuous Integration. Everything builds fine but when the deployment occurs, it deploys WebAppCore. As I understand it, that's the expected behavior since that's the first project in the solution. I want it to deploy WebApplication1.

我的问题似乎是相同的这一个:
Azure的网站部署特定Web项目

My question appears to be identical to this one: Azure websites deploy specific web project

对这个问题的解决方案是去湛蓝的网站配置页面,并添加项目的应用环境,并给它我想部署该项目的回购根相对路径。就我而言,这是:

The solution to that question is to go to the azure website configure page and add an app setting of Project and give it the repo root relative path of the project I want deployed. In my case that was:

项目:WebApplication1 \\ WebApplication1 \\ WebApplication1.csproj

Project: WebApplication1\WebApplication1\WebApplication1.csproj

设置似乎并没有工作。我试过的路径,该项目的许多其他组合和没有似乎工作。

The setting doesn't seem to work. I've tried many other combinations of the path to the project and none seem to work.

下面是详细信息:


  • 的Visual Studio 2013

  • Visual Studio的在线

  • 托管git的生成过程

  • 模板是GitContinuousDeploymentTemplate.12.xaml

在模板的流程设置:


  • 构建\\项目设置为解决方案

  • 部署\\ Windows Azure的部署环境是我蔚蓝的网站。

1故障排除
由于这些都是所有的测试项目,当我删除WebAppCore,WebApplication1现在在解决方案的唯一项目和部署的罚款。

Troubleshooting 1 Since these are all test projects, when I remove WebAppCore, WebApplication1 is now the only project in the solution and that deploys fine.

2疑难解答
虽然这不是我想要的修复,我决定利用这里所描述(虽然这篇文章还提到使用项目的应用程序设置)一个.deployment文件尝试:
<一href=\"http://stackoverflow.com/questions/21245257/how-can-i-use-the-tfs-online-azure-website-integration-when-there-are-two-w\">How我可以使用TFS在线&LT; - &GT;当有解决两个Web应用程序的Azure网站集成

Troubleshooting 2 Even though it's not the fix I want, I decided to attempt using a .deployment file as described here (although this article also mentions using a Project app setting): How can I use the TFS Online <--> Azure Website integration when there are two web apps in the solution

这没有工作,要么

推荐答案

我在不同的论坛中收到的这条评论微软和想我会在这里补充,因为它原来是答案:

I received this comment from Microsoft on a different forum and thought I'd add it here as it turned out to be the answer:

目前建造一做CI从VSO天青将在该解决方案部署按字母顺序第一个Web应用程序定义。如果你要部署一个特定的Web应用程序,你需要创建只有在它的Web应用程序的解决方案。从蔚蓝的门户网站设置向导做它最好仅基于1团队项目的解决方案,只有一个解决方案中的网站简单的约定为您设置的一切行动。这是我们期望应对未来以便为用户提供更多的灵活性和控制的东西。

Currently build definitions which do a CI from VSO to Azure will deploy the first web application alphabetically in that solution. If you have a specific web application you want to deploy you will need to create a solution with only that web application in it. The setup wizard from the azure portal does it's best to set everything up for you based on simple conventions of only 1 solution in your team project and only 1 website in your solution. This is something we expect to address in the future in order to provide users with more flexibility and control.

链接
<一href=\"http://social.msdn.microsoft.com/Forums/windowsazure/en-US/95f161f6-9370-43ad-9ac5-714f8978cc5e/continuous-integration-deploying-wrong-project-from-solution?forum=azuregit\">http://social.msdn.microsoft.com/Forums/windowsazure/en-US/95f161f6-9370-43ad-9ac5-714f8978cc5e/continuous-integration-deploying-wrong-project-from-solution?forum=azuregit

这篇关于使用Git部署到Azure中不能部署从多项目解决方案正确的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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