Showing posts with label Team Foundation Server 2015. Show all posts
Showing posts with label Team Foundation Server 2015. Show all posts

Tuesday, September 20, 2016

Why I still prefer using TFS vs. using Git

On all of my recent projects, I have been primarily using Git source control mainly because of the features for local feature branches for locally developing features and functionality without committing a branch directly to the main source control repository.

Of course, being a Microsoft developer, I am using Git within the Visual Studio IDE which presents its own challenges since Git support was added to the Visual Studio IDE very recently and mainly as an afterthought for functionality to cater to the needs of non-Microsoft-centric developers.

However, TFS is a platform which has been around for the last 11 years and has very robust and full-featured support within the Visual Studio IDE and provides many more features and functionality directly within the Visual Studio IDE.  In addition, many features are much more easily accessible and usable than with Git support in the Visual Studio IDE.


  1. First of all, Visual Studio has full support for viewing source control for TFS using Source Control Explorer directly within the Visual Studio IDE.  Unfortunately, while using Git, the developer is forced to browse to the repository within the browser in order to view source.
  2. Using Source Control Explorer within the Visual Studio IDE with TFS, you get much better visualization of the branching structure and how branches are interrelated to each other.
  3. Using Source Control Explorer within the Visual Studio IDE with TFS, you also have the ability to view "deleted" files from the TFS repository.  Using Git within the browser, there are no such options.
  4. Performing commits within TFS allows for meaningful commit numbers called "Changesets" which are easily understandable and can be readily remembered.  However, with Git, commits are very long random GUIDs which are neither easily understandable nor remembered.
  5. TFS allows committing just a single file even when there are other pending edits on your file system, while Git ALWAYS requires a commit and pull request before committing/pushing even a SINGLE file.
  6. Using Git within the Visual Studio IDE, only a very small portion of the total commands for using Git are available from a GUI interface.  All other operations require using a separate GIT client such as SourceTree or GitKraken or requires using the Git Command-Line client.  However, using TFS, nearly every operation is available within the GUI while only a few operations require using the TFS Power Tools through the command-line interface.
  7. Code Reviews within Git require a branching strategy and creating Pull requests from within the browser, while Code Reviews within TFS can be done on any committed code and are significantly easier and can be initiated directly from within the Visual Studio IDE.
  8. 3rd party merging and comparison tools such as Beyond Compare can be readily integrated into the IDE while using TFS, however, using Git only supports Visual Studio's built-in comparison and merging by default.  In order to support Beyond Compare for Git requires the installation of the Git Extensions for Visual Studio which still provides incomplete support at best.
  9. TFS allows "Shelving" support directly within the IDE as well as easily reviewing Shelvesets, however, Visual Studio has no built-in support for "Stashing" when using Git.  
So, even though Git is becoming increasingly popular to use as a source control repository, for Microsoft-based developers using the Visual Studio IDE, using Git over TFS presents some significant disadvantages that should be carefully weighed and considered before choosing Git over TFS as the de facto source control repository for your development team and organization.

Tuesday, September 13, 2016

Code Review in TFS vs. Git

If you are currently using Git with Team Foundation Server or Visual Studio Online, you may be wondering how the process of Code Reviews differs between the 2 source control platforms.

Well, they differ remarkably!

In fact, if you compare the TFS Code Review solution side-by-side with the Git Code Review solution, the TFS Code Review solution is FAR better and much more intuitive to use than the Git Code Review process.

Get your code reviewed with Visual Studiohttps://www.visualstudio.com/en-us/docs/tfvc/get-code-reviewed-vs

With TFS Code Reviews, you can easily review any set of code that exists in the TFS Repository which is extremely convenient!

However, with Git Code Reviews, you have to create feature branches and then create "Pull Requests" in order to get code reviewed before it is merged back into the main branch:

Review code with pull requestshttps://www.visualstudio.com/en-us/docs/git/pull-requests

Ideally, Microsoft would make the process of performing Code Reviews IDENTICAL between using Git or TFS Source Control!

If you also believe that Microsoft should make these 2 completely disparate processes consolidated within the Visual Studio IDE regardless of which source control system the developer is using, then you should vote for this UserVoice item here: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/16046128-make-git-code-reviews-more-like-tfs-code-reviews


Saturday, September 10, 2016

Connecting to Team Foundation Server/Visual Studio Online using Visual Studio

As a consultant, I often end up working with teams which have not used Team Foundation Server or Visual Studio Online before and therefore end up training them on how to connect to TFS/VSO using Visual Studio.

Since I do this often enough from project to project, I thought I would finally write a blog on how to do this!

First of all, Microsoft has already written 2 articles on just how to do this:

Connect to Visual Studio Team Services from Eclipse, Xcode, Visual Studio, and morehttps://www.visualstudio.com/en-us/docs/setup-admin/team-services/connect-to-visual-studio-team-services

Connect to team projectshttps://www.visualstudio.com/docs/connect/connect-team-projects#connect-from-visual-studio-or-team-explorer

This article also addresses how to connect using Visual Studio 2013, but this still applies to Visual Studio 2015: https://binary-stuff.com/post/connecting-visual-studio-to-vso

One of the easiest methods the above article does not mention is connection from the Team menu!






From there, all the steps remain the same!  That is really all there is to it!

Thursday, August 18, 2016

Create a README file for Team Foundation Server/Visual Studio Online

If you want to create a README file for your Team Foundation Server/Visual Studio Online project in a manner similar to what you see used on sites such as GitHub, you can do that rather readily using the web-based User Interface!

Just as with standard markdown files (.md), you can use Markdown syntax to create the README file in VSO as outlined in this article: https://www.visualstudio.com/en-us/docs/reference/markdown-guidance

In addition, you even have the option of adding this README file directly to the Overview dashboard so that it is immediately visible to all of your users!

Wednesday, August 10, 2016

Handling spaces in Git Urls using TeamCity

If you are using Team Foundation Server/Visual Studio Online for your Git repository, there is a good chance that you may end up with spaces in your Git repository Url!

This is because TFS/VSO uses the Project Name as the method to generate the Git repository Url.

Unfortunately, this presents an immediate problem for TeamCity because spaces in Urls are translated as the %20 character!  Once you run a build in TeamCity with a Url containing these characters, the build on the build agent will fail with an error such as this:

"20Reports defined in VCS Root: VSO Reports"

Thankfully, there is a solution to this problem even though it is not perfect. To workaround around this problem, you simply escape the %20 characters with an additional % sign like so in your VCS Url:

VSO%%20Reports

This should resolve the issue with being able to execute a build with a VCS Url that contains spaces.

However, you may still end up with an error message like this in your build log beneath the Artifact dependencies:

Parameter "20Reports" is undefined

You can ignore this error message in the build log, but hopefully the Jetbrains TeamCity development team will fix this issue completely in the near future!




Tuesday, August 2, 2016

Managing Sprints in Team Foundation Server/Visual Studio Online

When you initially set up the Scrum template in Team Foundation Server/Visual Studio Online, you will get a set of 6 initial Sprints.

However, as you come close to completing your initial set of 6 Sprints, you may be wondering how to create additional Sprints or Iterations!

Well, by following these articles, you can create additional Sprints for your project:

Define sprints

https://www.visualstudio.com/en-us/docs/work/scrum/define-sprints

Sprint planning

https://www.visualstudio.com/en-us/docs/work/scrum/sprint-planning

Customize area and iteration paths

https://www.visualstudio.com/en-us/docs/work/customize/modify-areas-iterations


Stakeholder licenses for Team Foundation Server and Visual Studio Online

Since Stakeholder licenses are FREE for Team Foundation Server/Visual Studio Online users, naturally, many companies/organizations want to understand what features/functionality is provided with this FREE license.

You can find a basic overview of operations the Stakeholder license is allowed to do here: https://www.visualstudio.com/en-us/news/2014-aug-27-vso.aspx

For more detailed information on the exact features and functionality provided to the Stakeholder license, you can check out this handy article provided by Microsoft: https://www.visualstudio.com/en-us/docs/work/connect/work-as-a-stakeholder

Once you read the above article, you will notice that Stakeholder licenses are basically restricted to managing Work Items on a very basic level.  Working in Team Rooms or even doing simple operations such as dragging and dropping Work Items from 1 state to another on the Kanban board are restricted!

Of course, tools such as Trello (https://trello.com/) and KanbanFlow (https://kanbanflow.com/) do not restrict their users from such operations, so it does make much sense why Microsoft would restrict this capability in Visual Studio Online/Visual Studio Team Services.

If you want Microsoft to include drag and drop on the Kanban Board for users with a Stakeholder license, you can vote for this UserVoice item here: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/12797556-allow-stakeholders-to-drag-and-drop-work-items




Friday, July 29, 2016

Time Tracking for Team Foundation Server/Visual Studio Online

One of the most highly requested features for Team Foundation Server and Visual Studio Online is to add support for a timer or a similar time tracking feature that allows users of TFS and VSO to track the ACTUAL time spent on a particular Work Item Task.

Unfortunately, Microsoft is quite adamant about not providing support for this functionality within the base TFS/VSO product as evidenced by this UserVoice item: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/4096739-tfs-task-timer-tool-to-measure-working-time-in-a-t

However, this UserVoice item was declined back in 2013, but there is another UserVoice item which is still active that might garner some attention for the either TFS 2015 or the next release of TFS if enough people vote on this UserVoice item: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/8219763-start-work-starts-a-timer

Aside from that, there are a few commercial options for TFS Time Tracking:

http://www.tfs-timetracker.com/

http://www.teamexpand.com/product/tfs-timesheet

http://www.imaginet.com/imaginet-timesheet-for-tfs/#pricing

https://sswtimepro.com/#Pricing

There is also a free project called TFS Working On, but this project seems to no longer being actively developed for recent releases of TFS: http://tfsworkingon.codeplex.com/


Wednesday, July 20, 2016

Managing alerts in Team Foundation Server and Visual Studio Online

If you want to manage Alerts for yourself or your team members, you can set up Alerts by following this article: https://www.visualstudio.com/en-us/docs/work/track/alerts-and-notifications

Basically, when you log into Team Web Access, you have to click on your gear icon in the toolbar to get to the Control Panel:



Once you get into the Control Panel, you will want to click on the Alerts tab:


You can then set up the different types of Alerts for yourself.  I normally configure Alerts for Work Items:


You should then have the Alerts show up as follows:


Sunday, July 10, 2016

This Admin Console User cannot be removed

I recently upgrade my Team Foundation Server instance and noticed several invalid users in my TFS Admin Console.  When I attempted to remove these invalid users, I received the following error message:


Fortunately, the Microsoft link provided was very helpful and provided this solution:  https://blogs.msdn.microsoft.com/tfsao/2013/05/01/removing-an-admin-console-user-with-dbo-permissions/

Once I followed the instructions to change the dbo owner in the Files property in SQL Server for the TFS_DefaultCollection database, I could remove the user from the TFS Admin Console!

Upgrading to Team Foundation Server 2015

It has been a while since Team Foundation Server 2015 was released and now that Update 3 was recently released, I decided it was time to revisit doing upgrades from earlier releases of Team Foundation Server such as Team Foundation Server 2013.

The upgrade process remains largely the same as earlier releases of Team Foundation Server, however, there is no longer a requirement to UNINSTALL the earlier release of Team Foundation Server prior to installing Team Foundation Server 2015.






















Wednesday, June 29, 2016

Finding the Team Project when logging into Visual Studio Online/Team Foundation Server the 1st time

A question that I get frequently asked by many users who are using Team Foundation Server/Visual Studio Online for the 1st time, is where are the Team Projects?

Well, when you 1st log into the web-based dashboard of Team Foundation Server or Visual Studio Online, you will notice that there are no projects listed anywhere on the home page dashboard!

As Microsoft has it currently, even though you are assigned to a project, you still have to manually browse to that project the 1st time you log into the system as follows:


Under "Recent projects & teams", you will have to click on the link for "Browse".  This will then open a Browse Server dialog which will allow you to choose from the respective projects to which you have been assigned:


Once you select the appropriate project, these projects will not appear beneath "Recent projects & teams":


Next, you can click on the name of one of your Team Projects to navigate to that project:




This will take you to YET ANOTHER Dashboard from which you can access basic information about your Team Project.  For most users, though, you will want to go straight to the Work Items which is in the top left-hand navigation appropriately titled "Work":


Once you access that area, you will be able to view all of your Work Items such as Epics, Features, and Product Backlog Items!

Friday, June 24, 2016

Creating Work Items in Team Foundation Server/Visual Studio Online

I have been working with Team Foundation Server Work Items for quite some time and one of the things that has always been frustrating to me has been the disparity in web-based work item functionality between different views in Team Foundation Server.

For example, if you go into the Home Dashboard of Team Foundation Server, you will be presented with the following view:






This Dashboard view allows you to readily any type of Work Item such as a Bug, Epic, Feature, Impediment, Product Backlog Item, Task or Test Case.

However, as soon as I switch to the Work section of Team Foundation Server, I am presented with these 2 views instead!


In these views, I can only add a Feature, Product Backlog Item or a Bug! 


There is no default view in the Work section that allows me to easily add any of these other Work Items: Epic, Impediment, Task or Test Case.  Instead, if I want to add any of these other Work Item types, I have to add a new Link to an existing Work Item and then create these other types of Work Items from there:





This is especially annoying if you want to create a parent record directly such as an Epic which will include multiple Product Backlog Items or Features.  But, unfortunately, the Epic Work Item type cannot be created directly from the Work section of Team Foundation Server and must either be done this way or through the Home Dashboard!

Of course, if you are managing Work Items through Visual Studio Team Explorer, all Work Item types are immediately available to you!






Hopefully, Microsoft will correct these web-based Work Item usability problems in a future release of Team Foundation Server/Visual Studio Online, but for now, the best solution is to work through the web-based Home Dashboard!!

Friday, June 10, 2016

Get started using Git with Visual Studio and Team Foundation Server

If you are an organization adopting Git with Team Foundation Server/Visual Studio Online, then you will definitely want to check out this article: https://www.visualstudio.com/en-us/docs/git/get-started

The original article references Visual Studio 2013, so if you are using Visual Studio 2015, you will want to check out this article instead for some updates: https://www.visualstudio.com/en-us/docs/git/share-your-code-in-git-vs

For a full overview of how to work with Git, you can go through all of the articles listed in the Overview:  https://www.visualstudio.com/en-us/docs/git/overview

Once you have gone through the articles, you will want to make sure your environment is set up for using Git.

In order to do that, you will have to first set up your Source Control Plug-in to use Git by going into the Tools-->Options-->Source Control--Plug-in Selection:




Unfortunately, Microsoft Visual Studio leaves a lot to be desired when it comes to working with Git inside of Visual Studio.

Therefore, you will also probably want to at least install the GitExtensions Visual Studio extension as well: https://visualstudiogallery.msdn.microsoft.com/35c2f314-a6ab-479a-b4a3-cff99103d32f

In addition, it is frequently useful to have TortoiseGit installed as well to support working with Git from within Windows Explorer: https://tortoisegit.org/

Once you have one of these tools set up, you will want to connect to your Git repository and clone the repository to your local file system.

Now, you can create the solution or open an existing solution from within Visual Studio.

When you are working with Visual Studio solutions, however, there are typically a large number of files that you want to exclude from being checked into your Git source control repository, so  you will need to add a .gitignore file using the following steps:

From the Team Explorer Home menu, click on the Settings button:



You will then be presented with a Settings dialog which will allow you to configure the Settings for Git.  When you select the "Global Settings", you will be presented with options to configure your user credentials for your Git repository:



Next up, you will have to configure your Git Repository settings.  You can go back to the Git Settings screen and now select "Repository Settings":



At the bottom of this screen, you will see the options to add a .gitignore file as well as a .gitattributes file.

You can click on the "Add" button to add a default .gitignore file to your solution so that the bin directory, packages and various other common directories and files will automatically be excluded from checking into your Git repository.

Once you have this set up, you will see the source control bindings in your Visual Studio Solution Explorer:


When you make changes to your code files, you will then be able to commit your changes to source control:


Just as with standard source control check-ins, you can enter a code comment before committing your code:



Then once you click on the "Commit All" button, this will ONLY commit the source code changes to your local file system!  You will still have to "PUSH" or "SYNC" the source code changes to get them into your remote Git Repository!


After you commit your source code, Visual Studio will automatically provide you with a reminder notification that you have to do "Sync" of your source code to get it up into your remote Git Repository.  You can click on the Sync hyperlink in the notification message to push your changes up to your Git repository:


Once you click on the "Push" hyperlink, your changes will be pushed up to your remote Git repository!

That is all there is to getting started with using Git with Visual Studio!!