In TFS tutorial, we are going to learn how to create a team project in the Team Foundation Service using Visual Studio 2017. During this post, we are also going to take a brief overview of TFS templates. There are few templates available in team foundation and we are going to learn both in TFS tutorial. In this post, we will also see version control.
To introduce TFS properly, we will have to divide the tutorial into two parts. In the first part, we will introduce the tutorial and its various concepts and in the second part, we will see how to use TFS with Visual Studio 2017.
Introducing Microsoft Team Foundation Server 2017: Introduction to Team Projects:
Here will see the three aspects of Team Foundation Service:
- TFS Projects.
- TFS Process templates.
- Team project collection.
We have to understand:
- The logical definition of the team project.
- And the physical definition of the team project.
- And permission needed at individual and team level to access TFS.
To begin with, think of a team project as a container that holds a collection of artifacts that is being used in a project. So these containers and the project defines the source control whether it is Git or TFS.
Logical definitions of TFS:
It defines the work items you are going to use whether it is scrum, agile, or CMMI. These types will define the documents that you are going to work with and the kind of reports that are available. All of these are dictated again by the team project and if they are drawn up with that XML file. To make the project’s process template.
When we create the project, it kicks off the project template and it actually creates the project with the artifacts that we define in it.
Physical definition of TFS:
The physical definition is that it is a group of tools. In the team explorer page we can see the version control, branches, builds, work items, settings, all of them encompassed inside one team explorer view.
If you are using Git, you will have pull requests available.
In order to work with the team project and create a team project, we have to be what we call a project collection administrator. With these high privileges, we can do quite a bit with a project collection.
- Collection Administrator: An administrator can access all the projects in the collection and not just one project in that collection. The administrator can create or delete projects in the collection.
- Project Administrator: Under collection, Administrator is the project administrator. A project administrator can create or delete the projects. With project administrator permissions, the administrator can create work items, check code.
- Contributor Permissions: Under the project, the administrator comes the contributor permissions. A member must be a contributor at a minimum to be able to modify code at all.
- Stakeholder: Finally, we have a Stakeholder. Stakeholder permission does not have any permissions to modify the code in the project. They are not able to check-in or check-out the code. They are able to edit the work items and work with the work items that are assigned to them. A stakeholder only has read-only access to a project as the most part.
TFS tutorial, getting started with TFS:
In the previous section, we have read the necessary information about the TFS in Visual Studio 2017. So, now we can go forward and create a new TFS repository and add a project to it.
In Visual Studio we have the team explorer window built into it.
Click on home, my projects and teams, new project. This will take us to the web interface where we can create a new project with name and description. Here we can set the version control we want to use. Then we can choose the project template. We can also modify the project template.
after choosing all the necessary items, we will click on manage connections plug. Now we can see the newly created project in the drop-down, we will click on it and select it. All the work related to the version control can be initiated from the team explorer.
Start a New Project in a new TFS repository:
In this section of the TFS tutorial, you will start with creating a new repository in Azure DevOps. This new repository will be TFS repository. After creating the new repository, you will learn to add a new .Dot NET core project to this repository.
Please read on to continue with the new TFS tutorial.
- Google search Azure DevOps and click on the link shown in the image below.
- Loin with the credentials. If you already do not have an account, please create a new account.
- Now click into Sign in to Azure DevOps.
- After you have logged in, you will see a dashboard.
- Now click on New Organization.
- Click Continue in the below image.
- Give a name to your Organization, in our case it is TecKangaroo.
- Also, choose a region that is closest to your team and click continue.
- Give a project Name in the field and click Advanced.
- Clicking Advanced will reveal additional options. In this options is where we should not forget to select Team Foundation Version Control.
- And only now click on Create.
- Login into Visual Studio 2017 with the same account that you logged into Azure DevOps.
- Press the keyboard shortcut Ctrl+\+m to open team explorer window.
- Team Explorer window can be opened with View>Team Explorer.
- Now click on the small Connect Plug in the team explorer window.
- Now click on the manage connections.
- And then connect to a project.
- Now select the project from the available project. Please ensure that the selected project is a TFS project and not a Git project.
- Now click on Connect.
- Now click on Map and Get.
- Now you have successfully created a TFS solution.
- Let us proceed with adding a project of our choice to this repository.
- Press Ctrl+Shitf+N to launch the new project Dialog box.
- For this TFS tutorial, we will make a new .NET Core Web site.
- Choose a template for the site, and click OK.
- Right click on the project file and select the Source Control and Add solution to Source Control.
- Now click on Ok
- Now come back to Team Explorer Window.
- Now click on Pending Changes.
- First, add a comment as shown in the figure and then click on Check In.
- Click Yes.
- Now we will see the Success Message so the project has been successfully pushed to the repository.
- Now we will go back to Azure DevOps and click on Repos.
- Now we can see the project into the Repository as shown below.
- There we go, we have successfully created a TFS Source control. And therefore our TecKangaroo site will be safe in the TFS server and proper version control will be taken care of.
Types of Version Control available with Azure DevOps (Optional):
Below we will also look into some additional topics in Azure DevOps.
We will take a look at two version control method,
- TFS and
For more information on TFS tutorial please read on.
There are three projects available, by default. There is Scrum, CMMI, and Agile as you might have seen in the advanced options in the Azure DevOps.
Scrum: If you are tracking the project on task-basis, or if your project is based on a backlog such that all the tasks need to be done in the certain day. And each task needs to be specified completed before the specific time. If you want to track all that, you can use Scrum.
CMMI: It is a template that is available. It is for more formal projects requiring a framework for process improvement and an auditable record for decision. A good example will be the change control method. If you are in IT, and you have certain methods and procedures that get audited on, then this is the best method to go to.
Agile: This template is flexible and will work great for more teams using agile planning methods. It will work for those practicing scrum
For our project, we choose Agile.
The SharePoint site is created in the team foundation server. If you do not have a share point site created, please click on, do not create.
If all the changes that are made locally need to be checked out and do the changes and check back in on the central team foundation server. This is where you check in, the other team members can see the changes.
Git is more of a local repository. All the team members can see the local changes in a shared particular shared drive
We saw how to create a TFS project and add our project of choice into the repository using the TFS tutorial. This is one of the best tutorials for TFS out there. But if you have questions and doubts please let us know in the comments below. If you would like to know something more specific on TFS tutorial please let us know that as well.
For more awesome posts like TFS tutorial, please check out TecKangaroo often.