nedjelja, 17. veljače 2013.

Solved: How to connect to Microsoft's free Team Foundation Server

Solved: Microsoft's free TFS hosting

Would you like to store your code somewhere where it will be accessible to you no matter where you are? Do you need to track your code's history, bugs, changesets or manage work items? Let me answer that for you: „Yes you do!“ I am sure you know what Microsoft's „Team foundation server“ is, otherwise you probably wouldn't be reading this so let's cut to the chase.
A few people asked me what is the best place to get TFS for free. Well, if you are looking for a free TFS service, I believe that the best place to look is https://tfs.visualstudio.com/ . The good people at Microsoft offer you your own free space on their „Team foundation server“. It is as easy as creating a Microsoft account (you can use your old e-mail address or create a new one) and choosing you TFS URL. And just by doing that you get TFS access for 5 people and an unlimited number of projects.
If you have used „Team foundation server“ before then that is all you need to know, head on to https://tfs.visualstudio.com/ and start checking in your code.
If you have never used Team Foundation Server, then here is a thorough step by step guide on how to start using it.

Solved: How to start using free Team Foundation Server hosting

Here is a step by step pictures tutorial on using https://tfs.visualstudio.com/ TFS hosting. First go to https://tfs.visualstudio.com/ and click on „Sign up for free“.
On this screen enter your account url. This can be anything you want as long as it is not taken. For this example, I chose, you guessed it, „example“. Go ahead and click on „Create account“.

TFS account creation
If you are not signed in, you will be redirected to this screen. Go ahead and sign in with you Microsoft account. If you don't have one, click on „Sign up now“.
Windows account sign in
This picture shows Microsoft account creation. You will see this only if you clicked on „Sign up now“ in the last step. Use this screen to register for a „Windows Live ID“.
Windows account creation

Once you are signed in and have clicked on „Create account“ in the first picture , your TFS account will be created and you will be redirected to your main account screen. Here you can manage your projects. For now go and click on „New team project“.

TFS overview

Choose a project name and description. Leave the „process template“ and „version control“ fields as they are and click on „Create project“.

TFS create project
You have successfully created a new team project and as the web site says, your team is going to absolutely love this. Let's just ask them will we... For now, just click on „Navigate to project“.

TFS project created
This is your project overview. You can use this page to create tasks, bugs or more. But let's  just connect with „Visual studio“ for now.

TFS project overview

In order to connect to your newly created TFS account with Visual studio you will need Visual Studio 2012, Visual Studio  2010 or Visual Studio  2008. You can use Visual studio 2012 „out of the box“, but in order to connect with Visual Studio 2010 you will need to install Service pack 1 and GDR compatibility update. You can download them from these links:
Visual Studio SP1 - http://www.microsoft.com/en-us/download/details.aspx?id=23691
GDR compatibility - http://www.microsoft.com/en-us/download/details.aspx?id=29082

 Once you have installed these updates, open Visual studio, open your solution and in the Team Explorer  tab click on „Connect to Team Project“.
Visual Studio 2010 Team Explorer
Click on "servers".
Visual Studio 2010 TFS list
Click on „Add...“ and enter the URL of your TFS account. Then click OK.
Visual Studio 2010 TFS

At this point you will be asked to log in with your Windows account. Do so, and you will see a list of Team projects that you can connect to. Choose your project and click „Connect“.
Visual Studio 2010 select project
Open Solution Explorer, right click your solution and choose „Add to source control“. This will add your solution to your TFS account.
Visual Studio 2010 add solution to source control
Choose team project location. This will be the project that you created on the TFS web site.
Visual Studio 2010 add solution to source control
After Visual Studio does his thing, open the Pending changes tab and you will see a list of all the files in your solution that are different than on the TFS server. Since you are adding your solution for the first time, all the files are in the „add“ state.  Mark them all as checked and click on „Check in“.
Visual Studio 2010 pending changes
Confirm your check in and select „Don't prompt again“. Seriously, who wants that?

Visual Studio 2010 check in

Congratulations, you have successfully added your solution to you TFS project.
Let's take a look on how to grab that solution on another computer. Just for fun, let's use Visual Studio 2012. You won't need any updates for this.

Open Visual Studio, choose „Connect to Team Foundation Server“ in the Team explorer tab, add your server with the URL you created (https://example.visualstudio.tfs), choose your project and click connect. All this is exactly the same as mentioned in the previous section.

Once you can see your server in the Team Explorer tab, you are connected.
Now click on „Source Control Explorer“.
Visual Studio 2012 Team Explorer
In source control, find your project, right click it and choose „Get latest version“.
Visual Studio 2012 Get latest version

 Visual Studio will now ask you to map the server folder to a local folder. This is where Visual Studio will download all the files that you checked in in the previous section. So, choose the folder and click on „Map“.
Visual Studio 2012 folder mapping
 Visual studio will now download all the files in the project. If you click on the project folder in source control , you will see its contents. From here you can open the downloaded solution. Go ahead and do that, double click the solution file.

Visual Studio 2012 open solution

 You now have access to your project on both computers. Any change you make to the files will appear in the „Pending changes“ tab from where you can check in the changes.

Visual Studio 2012 pending changes
 If you have any questions feel free to post them in the comment section, I will be happy to answer.



















Nema komentara:

Objavi komentar