How to Get Started With Visual Studio Team Services

DZone 's Guide to

How to Get Started With Visual Studio Team Services

In this tutorial, you'll learn to get started with Visual Studio Team Services, the platform used by development teams at Microsoft.

· DevOps Zone ·
Free Resource

In this post, we're going to explore how to get a full enterprise-grade development platform for free in 4 steps. Microsoft is offering for free the same environment that all of its engineers use every day to us.

In this specific post, we'll see how to get started from zero and at the end, we'll have our project hosted in the MS Cloud. The only requisite is to have a Microsoft Account. If you don't have an MS Account, you can subscribe for free.

1. Get Started With Visual Studio Team Services

Our first step is to go to https://www.visualstudio.com/ and click the button "Get started for free" under the Visual Studio Team Services column.

If we aren't logged in with our MS account, the site will ask to do so. After a successful login, we're asked to choose the third level domain name to access our VSTS environment in the cloud. We also choose if we want to manage the code with Git or Team Foundation Version Control. In this example we choose Git. Then we press Continue.

We wait a few seconds. The system now welcomes us with a brand new MyFirstProject.

2. Clone

If we have Visual Studio installed we can clone the repository directly with it by clicking the "Clone in Visual Studio" button. If we don't have Visual Studio installed we can download the Community version for free. Visual Studio will ask us to log in, and we have to log in with the same credentials used for the VSTS website.

After a successful login, Visual Studio will ask the download location and we click Clone.

We wait a few seconds and that's it. We can see that Visual Studio is working in the MyFirstProject repository (branch master) in the bottom-right corner of the window.

3. Initialize Our Repo

What we've done is good but a bit empty. Our repository has no code at all. For this example, we're going to create a brand new.NET Core Console app and push it back in the Microsoft cloud.

From the File menu, we choose New -> Project...

Then we choose a.NET Console App. We make sure that the location is the MyFirstProject location and if it's not we change the Location with the Browse button. Then we press OK.

Now we have a solution with a brand new fantastic app that needs to be saved in the cloud. To better initialize our git repo we add a .gitignore file to avoid unwanted assemblies and other files in our source control system. In the Team Explorer tool window we go to Settings -> Repository Settings and then we click on Add under the Ignore File section.

Now we're ready to commit and push our code into VSTS.

4. Push to VSTS

In the Team Explorer tool window, we press the Home button and the Changes.

As we can see, Visual Studio shows us the new files and we stage them all pressing the plus icon. Then we insert a commit message like "Init" and press Commit Staged.

We get a success message and we press the Sync button to upload our work to VSTS.

If we go back in the browser and refresh the page, we'll see something like this: If we go in the Code->Commits section, we can see our commit.


And that's it! It's so easy! In just a few minutes, we're working with the same platform that all development teams in Microsoft use. We set rock-solid foundations for our project. It is hosted in one of the best clouds in the world and we can use lots of tools and processes to organize our project. VSTS is full of features ranging from work organization to build, testing, and release management tools. In future posts, I'll explore other features of VSTS because I think it is the best environment in which to work professionally with software.

devops, visual studio, vsts

Published at DZone with permission of Michele Ferracin , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}