Team Foundation Services on Windows Azure

Build provided a number of great announcements and information related to Microsoft’s Windows Azure platform.  This platform is a collection of products that provide hosting and services for start-ups, large businesses and even the hobbyist developer.  I plan to write about some of these services and how they integrate together.  I am going to start with one of the lesser known services, but certainly one that is an integral part of the development process, Team Foundation Services (TFS).

TFS on Azure is not new.  It was announced at Build.  Build 2011 that is.  Yes, it has been out for over a year and I still find people who are unaware of this when I mention it.  Originally launched on TFSPreview.com, it is still in preview mode, which means it is free for now.  It still offers all of the features you have come to expect from TFS, user story creation, bugs, tasks, iterations, and the wonderful burndown charts.  It does have a more formal url now in TFS.VisualStudio.com.  If you created a TFS Preview instance (ex. mysite.tfspreview.com), this does map to the new VisualStudio.com domain so no need to go out and reserve your preferred name on this domain.

Getting Started
Getting started is easy.  As with all of the Windows Azure services, you will need a Microsoft Account to sign up (formerly Live Account).  Sign in to the TFS site with your Microsoft Account.

Click the Sign up for free link.

image

Provide a name for your TFS environment.

image

That’s it.  You’re done.  You now have a full instance of TFS available to you and your team (up to 5 people per project).  For a small development shop, this solution provides all the benefits of TFS without having to install and manage the TFS infrastructure on premises. So now that this is provisioned, let’s connect it to your Visual Studio instance.

Connecting Visual Studio to TFS
I will use VS Express Web Edition 2012 to step through the connection process.  This will also work with the full versions of Visual Studio 2012.  It will also work with Visual Studio 2010, but this requires at least SP1.  VS Express Web Edition offers some really great tools for working with Windows Azure services, so it is the express version of choice if you are doing Azure or web development.  There are other versions including versions for Windows 8 and Windows Phone 8.  You can see them all here.  They will also connect to TFS in the same manner.

In the menu, select Team | Connect to Team Foundation Services.  In the top right corner of the dialog box, click the Servers button and in the Servers dialog, click the Add button.  Enter the account url for the TFS instance you created and click OK.  This is now the selected option in your TFS dropdown list.  It will display the project collections and projects available for connection.  You can add multiple server connections for TFS on Azure or TFS instance at work, allowing you to connect to multiple projects

image

Configuration for Different Windows 8 and TFS Microsoft Accounts
Windows 8 can be accessed with a Microsoft Account.  This makes it an easy experience to connect to all of Microsoft’s services without having to continually provide your credentials.  It can also be challenging if you want to connect to services with a different Microsoft account. 

If you are running Windows 8 and the Microsoft Account you used for TFS is different than the Microsoft Account used to log into your Windows 8 machine, you will see VS Express attempt to sign in to your TFS account with your machine’s Microsoft Account.  You will see 2 pop-up windows (try and then a retry) as it attempts to do this.  You will then get the following message.

image

This is because your Windows 8 OS Microsoft Account does not have permissions on this instance of TFS, which was created with a different Microsoft Account.  Hey, it happens and I’m sure not just for testing or blogging purposes.  Winking smile

Here are the steps to associate this TFS instance in VS if using a different Windows account.

  1. In VS Express, Open the web browser (View | Other Windows | Web Browser). 
  2. Navigate to Live.com.  If you are signed in, select the Sign Out on the menu in the upper right corner.
  3. Sign in with the credentials used to create the TFS account.
  4. Go through the Connect to Team Server steps above.  I’ve seen people reference shutting down and re-launching visual studio, but I did not need to do this.

This is only needed for the initial setup.  Now that VS Express is aware of this TFS instance, it shows in your list of available TFS connections in the dropdown.  There is the currently authenticated account information and a Sign Out / Sign In link in the lower left corner of this dialog so you can see what account you are using to connection and if needed, provide the proper credentials for each instance right in this screen.

Leave a comment