dinsdag 30 mei 2017

Setting up Visual Studio Team Services

Introduction

When a team of developers grows larger and larger it is a best practice to introduce Version Control in the project. Version control has some advantages :
  • A controlled way of working together on the same code.
  • Storing versions in order to understand the differences and to understand what happened during development of the code.
  • To see how much work a subproject/sprint was during evaluation.
  • As a backup for the code (in a former blogpost I described a way to automatically backup the project)
  • Creating multiple branches in the code in order to distinguish subprojects, Development and production code (eg. for hotfixes).

In this blogpost the following steps are described:
  • Step 1 : Create a sample project in Visual Studio
  • Step 2 : Create a Team Project
  • Step 3 : Connect to the Team project environment in Visual Studio.
  • Step 4:  Setup a workspace on your local system.
  • Step 5:  Add the project to Source control / Team project
  • Step 6:  Do some changes in the local VS project.
  • Step 7:  Check the online Team foundation Server environment.

Step 1: Create a sample project

First, lets make a solution with some examples in a Visual Studio project. The solution I've created for this blogpost includes a SQLProject, a SSISProject and a Tabular Project.



Step 2: Create a Team Project

The next step is to go to the VisualStudio.com and to create a new team project with New team project. 


Give the Team project a proper project name, give the project a Description, choose the type of version control and choose the type of project type with Work Item process. Choose Create.



Now, the project is created in Team Projects and an overview is given about the project.


Step 3:  Connect to the Team Project environment

The next step is to find the Team Explorer in Visual Studio, and there are several options to choose from. In this case, select the Connect link of the Visual Studio Team Services.




The window "Connect to Team Foundation Server" appears and now the url is needed of name of the Visual Studio Team services account. Select the option "Servers".



Press the Servers button and Add a new server. Login in with your account and press sign in



The following window appears


Connecting with the Visual Studio Team Services and select the Team projects.


Step 4: Setup a workspace

In Visual Studio it is needed that there is a local workspace to work with. This is a local copy of the code of the central repository. Click on Configure Workspace.


Next step is to Map & Get the local workspace with the central repository


When the Map&Get is successfully a message is presented : "The workspace was mapped successfully"

Step 5: Add the project to Source control / Team Projects

Now the workspace and the central repository is connected and now it 's time to add the local solution to the Visual Studio Team Services by clicking on Add Solution to Source Control.


Now, it is important to set the location in Visual Studio Team Services. Press OK when  this is done


Now the projects are marked with a + sign indicating that the files are ready to check in Visual Studio Team Services.


Right click on the solution and click on Check in to upload the code the repository.


Add some comment, check if everything is ok and press Check in


A confirmation window appears and click on Yes.


A confirmation is shown to the usr that the code is successfully checked in


Step 6: Do some changes in the local VS project

Now, let's see what happens when something changes in the code. In the initial situation the code is locked and check in.


For instance let's add a SSIS package to the SSIS project.


Two packages were added to the local Workspace. You can see this below Package1 and Package2.


Because the SSIS Packages are added to the project(file), the project (file) is also marked as changed and therefore this should be uploaded to the repository too.


Select the Project and click on the Source Control option.


An overview is shown of the new and changed packages. Click on Check in.


Step 7: The check the online Visual Studio Team Services environment

The last step is checking the online Visual Studio Team Services environment where the code is now stored.



Conclusion

In this blogpost I've described the setup of Visual Studio and Visual Studio Team Services working together such that version control of your BI project is enhanced.

Geen opmerkingen:

Een reactie posten