Buenas,
today we are going with a simple example: create a web application and deploy it in AZURE directly with a build from Team Foundation Service. (another question that arose during ) the talk of Team Foundation Service SecondNug ).
So who here is a tutorial format which in the end is my personal help:
1. Create a project ASP.Net MVC 4. In my case it is a very simple that you browse and displays the following:
2. Protect our project in Team Foundation Service .
Note: If you don’t have an account, my post on how to create a free account to test Team Foundation Service can help you.
3. Download the .net development tools from the .Net Developer Center azure. In my particular case for Visual Studio 2012 RC, are also available for Visual Studio 2010.
4. The next step is to go to the AZURE portal to create a website that is where to deploy our ASP.Net MVC 4 website. The portal is accessed from http://manage.windowsazure.com/
5. The portal options we can create a new WebSite or a CloudService to deploy our solution. In this case create a new “Cloud Service” with the QUICK CREATE option and reserving the urlhttp://elbrunoLabs04.cloudapp.net .
6. Once the service is created, access to it and already we can integrate it with the corresponding TFS instance.
7. Select the option “INTEGRATE SOURCE CONTROL // Set up TFS publishing”
8 We authorize the Team Foundation Service account to the Cloud Service.
9 Select the Team Project from which it will post the changes to our Cloud Service
10. At this time, the process of Linking between TFS and Cloud Service is launched.
11 And in few seconds completes the Linkking between both
12. At this point we can already publish our content from Source Control of TFS Preview to our Cloud Service.
13. For this example, I added a new Cloud project to the solution and I’ve added a WebRole from ASP.Net MVC 4 of solution (“ElBruno.MVC4.Labs02”) project
14. The next step is to let set up our project of Cloud so that you can publish to the cloud service that we have created. Although this process is much more complex and has many variants, the resumie in a few steps.
15 Select the Cloud project, display the shortcut menu and select the option “Publish”.
16 Set the steps for publishing in the first place, we chose the subscription of AZURE we want to use.
Note: you can read the complete step by step here .
17. Below we define the settings of our application. In my case I will leave the values by default, since I do not need or Remote Desktop, or IntelliTrace, etc.
18. Finally complete the publication to AZURE with the data by default and launched the publishing process.
19. The publishing process usually takes between 2 and 10 minutes to a Cloud Service.
20. In a few minutes we will have the active application on AZURE directly deployed from Visual Studio.![]()
21. Now, the idea with this exercise is have a definition of Team Build Service that directly publish the changes that are uploaded to Team Foundation Service Cloud service that we have created.This will create a new definition of build in Team Foundation Service and the same configure what you describe in the following steps.
22. In the first place, I will work with a build called “elbrunoLabs04_CD”.
23. Then we can define if the Build is for continuous integration or launch it manually, in this case, and as we have no fear of anything, will leave it in mode IC. (that translated into AZURE it allows us to make Continuous Deployment)
24. Once the Workspace defined and the Default build options, arrived at one of the most important points of this post: the ability to use a template specific to AZURE Build. At this point, we select the Build Process Template called AzureContinuousDeployment.xaml
25. Once defined the solution to compile basic data and tests to run, we see that we have 2 special for AZURE sections. We define the name of the settings of deploy, we have put in the 16 to 18 steps and except that need to make an override another value, the build definition would already be complete.
26. Starting at this time, each time that we protect a file will launch a new process of Build that automatically display the changes towards the azure portal.
And ready, almost 30 steps then already we can deploy our applications directly using Team Build in TFS Preview to AZURE ![]()
Saludos @ La Finca
El Bruno

Leave a comment