Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't deploy correct website from multi project solution using Git deployment to Azure

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.

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:

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.

Here are more details:

  • Visual Studio 2013
  • Visual Studio Online
  • Hosted git Build Process
  • Template is GitContinuousDeploymentTemplate.12.xaml

In the template Process settings:

  • Build\Projects set to the solution
  • Deployment\Windows Azure Deployment Environment is my azure website.

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.

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

This did not work either

like image 479
user2800795 Avatar asked Feb 25 '14 17:02

user2800795


People also ask

How do I deploy a GitHub repository to Azure?

Step 1: Connect your App to its Repository on GitHub It's safe to click Authorize application. Once authenticated, Azure will ask you which repository and which branch to deploy to your app. Select your GitHub repository from the list and make sure you are deploying the master branch. Then click OK to finish up.


1 Answers

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:

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.

Link http://social.msdn.microsoft.com/Forums/windowsazure/en-US/95f161f6-9370-43ad-9ac5-714f8978cc5e/continuous-integration-deploying-wrong-project-from-solution?forum=azuregit

like image 155
user2800795 Avatar answered Sep 30 '22 06:09

user2800795