Visual Studio Team Services

VSTS structure

Visual Studio Team Services Account (eg. peterdekeyser.visualstudio.com)

Create in Visual Studio

Go to the Team Explorer
Underneath 'Visual Studio Online', click on 'Sign Up'.
Enter the Account URL and click on the button Create Account.

Create via the website

Go to
https://app.vssps.visualstudio.com
Login if necessary.
Click on 'Create a free account now'.

Overview of Visual Studio Team Services Accounts connected to your Microsoft account

Go to
https://app.vssps.visualstudio.com
On the right you see your accounts.
If you open an account, you will get an overview of the recent Team projects (projects and teams).
To see all the projects, click on 'Browse' underneath 'Recent projects and teams'.
You will get an overview of all the project in the DefaultCollection.
A project can contain multiple repositories.

Connect in Visual Studio

In the menu Team, select 'Connect to Team Foundation Server…'.
In the Team Explorer, you will now see 'Select Team Projects'.
In the 'Connect to Team Foundation Server' form, choose the Team Foundation Server you want to connect to.
If it is not available, click on 'Servers', click on 'Add' and enter the Visual Studio Online Account.
If you want to open a Team Project, select it in the list. If not, deselect everything.
Click on OK.

Delete a Team project

Go to the Main page of the Default collection (https://account.visualstudio.com). Click on the Manage Account icon upper left.
In the 'Administer your account' page, click in 'View the collection administration page' (The collection needs to be selected.)
In the 'Collection profile' page, right click on the project you want to delete, or on the triangle in front of it. Click Delete.
The name of the team project will be asked as a confirmation, so just enter the name of the project. The project will be deleted.

Start a project with VSTS

Goal

We want to have a local GIT repository, to which we normally Commit.
Later we want to push the tested changes to a remote Visual Studio Team Services repository.

Situations

1. I have a team project with a repository on VSTS and I want a local clone
2. I have a local project with a local git repository and I want a remote VSTS repository
3. I have a local project without a repository and I want a local repository and a remote VSTS repository
4. I want to create a new project with a local repository and a remote VSTS repository

1. I have a team project with a repository on VSTS and I want a local repository

Step 1: Connect to the Team Project

If you are not connected to the VSTS Account
In the menu Team, select 'Connect to Team Foundation Server…'.
In the Team Explorer, you will now see 'Select Team Projects'.
In the 'Connect to Team Foundation Server' form, choose the Team Foundation Server you want to connect to.
If it is not available, click on 'Servers', click on 'Add' and enter your VSTS Account.
If you want to open a Team Project, select it in the list. If not, deselect everything.
Click on OK.

If you are connected to another VSTS Account
Select 'Disconnect form Team Foundation Server' in the 'Team' menu.
Connect as above.

If you are not connected to the Team Project, but to the VSTS Account
In the Team Explorer, in the top dropdown list, choose 'Projects and My Teams' - 'Connect to Team Projects…'.
In the Connect 'tab', click 'Select Team Projects…'.
In the 'Connect to Team Foundation Server' form, choose the Team Foundation Server you want to connect to.
Select the Team Project in the list. Click on OK.

If you are connected to another Team Project

Step 2: Create a local repository

If you didn't work on this project before, click on 'Clone this repository', to create a local repository.
Enter the path for the local Working folder / repository.
You can open your project now by Opening it underneath Solutions.

3. I have a local project without a repository and I want a local repository and a remote VSTS repository

1. If you are not connected to Visual Studio Team Services:
In the team explorer, select 'Connect'
Hosted Service Providers - click 'Connect'
Select the VSTS repository. Click 'Connect'.
2. Tools - Options - Source Control: GIT
3. File - Add to source control
This will create a local git repository in the project folder and commit the .gitignore and .gitattributes.
4. Create a remote VSTS repository
In the Team Explorer go to Sync(hronisation)
Select the user name and the account
Enter the name of the repository
Click on Publish Repository.

4. I want to create a new project with a local repository and a remote VSTS repository

Step 1: Create a VS solution with a local Git repository

Start up Visual Studio. Select 'New Project…'. Select the type of project.
Check 'Create directory for solution' and 'Add to source control'.
For name, enter the name of the main project. Most of the time this will be Service, or Gui.
For Location, enter the main folder for all your projects. Eg. C:\Projects
For Solution name, enter the name of the solution.
In the main folder, a folder with the name of the solution will be generated.
In this folder, you will find the .sln file and a folder with the name of the main project.
In this folder will also be created a Git repository with an initial Commit of the .gitattibutes and .getignore.

Step 2: Add a remote Git repository on Visual Studio Team Services

In Team Explorer, select 'Projects' - 'Connect to Team Projects…'.
Underneath 'Connect', click on 'Select Team Projects…'.
Select the Team Foundation Server, but don't select any Team Project. Click on 'Connect'.
In Team Explorer, select 'Project and My Teams' - 'New Team Project'.
You will go to the Azure website. Create the Team Project.
Back in Visual Studio, go to the local repository, right click on it and push it to VSO.
In Solutions, open the solution.

Add a user to a team project

Go to the dashboard and click on '+' in the Team members snippet.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License