Category Archives: TFS Extensibility

Licensing the Visual Studio family of products (or using them for free)

This is a cross-post from my other web site, Visual Studio Resources. If you as individual or your team are starting to develop paid or open source extensions for the Visual Studio family of products, the first thing is to know which products you can use legally:

A common question that you may have about using legally Visual Studio is which are your options. As always happens with licensing, it is a somewhat complex subject with quite a lot of options, but the good news is that if you are an individual developer or a small team, you can use all the family of Visual Studio products for free. I am not a lawyer, so validate all this information with a lawyer or legal department. The purpose of this post is to provide you the pointers to the different options.

The first thing to know are the products and editions:

  • Visual Studio
    • Visual Studio Community Edition
    • Visual Studio Professional Edition
    • Visual Studio Enterprise Edition
  • Visual Studio Code
  • Visual Studio Team Services
  • Team Foundation Server
    • Team Foundation Server
    • Team Foundation Server Express Edition

Licensing Visual Studio

Visual Studio Professional Edition and Enterprise Edition are paid versions, while the Community Edition is free for some scenarios.

You can compare the three editions on this page:

Compare Visual Studio 2015 Offerings

For Visual Studio Professional Edition and Enterprise Edition, you can compare the purchase options (Standalone for the Professional Edition, or Standard / Cloud subscriptions for both editions) on this page:

Visual Studio Purchasing Options

Visual Studio 2015 Community Edition is free under these scenarios (see Visual Studio Community):

  • For individuals: Any individual developer can use Visual Studio Community to create their own free or paid apps.
  • For non-enterprise organizations (meaning those with ≤250 PCs and ≤$1 Million US Dollars in annual revenue): Up to five users can use Visual Studio Community.
  • For enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue): Visual Studio Community can be used for the following scenarios:
    • In a classroom learning environment
    • For academic research
    • For contributing to open source projects

The exact details for the license terms of Visual Studio 2015 Community edition are here:

MICROSOFT SOFTWARE LICENSE TERMS. MICROSOFT VISUAL STUDIO COMMUNITY 2015

Licensing Visual Studio Code

Visual Studio Code is both open source and free. The detailed license is here:

MICROSOFT SOFTWARE LICENSE TERMS. MICROSOFT VISUAL STUDIO CODE

Licensing Visual Studio Team Services

Visual Studio Team Services distinguishes three kind of users:

Licensing Team Foundation Server

If you don’t like the idea of using Team Services on the cloud, you can use Team Foundation Server on-premises:

  • For individuals or teams up to 5 developers, you can use the free Team Foundation Server Express, that you can download here.
  • For teams with more than 5 developers you need to pay for the additional developers as explained here: Buy access to Team Foundation Server or TFS Test hub.

Finally, the ultimate guide for licensing Visual Studio, Visual Studio Team Services or Team Foundation Server is this white paper:

Visual Studio 2015 Licensing White Paper

HOWTO: Knowing the folder where Visual Studio is loading its own dlls from

If you are extending the Team Explorer toolwindow of Visual Studio, you will know it is particularly tricky, because it is not well documented, and you require some interfaces that are defined in dlls used by the Team Explorer. For example, I wrote a series of articles last year such as:

In all of them I had to specify the Visual Studio assemblies and location, such as:

  • Microsoft.TeamFoundation.Controls.dll (in folder C:\Program Files (x86)\Microsoft Visual Studio <version>\Common7\IDE\ReferenceAssemblies\v4.5\)
  • Microsoft.TeamFoundation.Git.Controls.dll (in folder C:\Program Files (x86)\Microsoft Visual Studio <version>\Common7\IDE\ReferenceAssemblies\v4.5\)

It happens that the name of the assembly and/or the folder can change from one version of Visual Studio to the next (and maybe from one update to another in the same Visual Studio version). Even the interfaces can change, but that’s another story.

To know the assemblies and folders that a Visual Studio process (devenv.exe) is using, you can use the invaluable Process Explorer tool. Here you can see it running two instances of devenv.exe (one for Visual Studio 2013 and another for VS 2015):

ProcessExplorer

You can configure it to show the dlls loaded by the selected process, clicking the View > Show Lower Pane and the View > Lower Pane View > DLLs:

ProcessExplorerViewDlls

With this tool you can find that Visual Studio 2013 loads Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll from the GAC (C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.TeamFoundation.WorkItemTracking\v4.0_12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll):

WorkItemTrackingDllVS2013

While Visual Studio 2015 loads it (surprise, surprise) from the folder that contains its Team Explorer extension (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\<randomname>\Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll):

WorkItemTrackingDllVS2015

Finally, Process Explorer provides also a Search dialog to find all the processes that have loaded a dll with some name:

ProcessExplorerSearch

MZ-Tools Articles Series: HOWTO: Get Git Branches, Commits, Changes, Conflicts, etc. in the Team Explorer of Visual Studio

The next five articles / samples that I have created about Team Explorer extensibility are about getting the information contained in the Git-related pages of the Team Explorer of Visual Studio 2013.

The Branches page contains the current branch and the Published and Unpublished sections:

TeamExplorerGitBranches

To get that information from a package you need to use the Microsoft.TeamFoundation.Git.Controls.Extensibility.IBranchesExt interface. See the article:

HOWTO: Get the Git Branches in the Team Explorer of Visual Studio from a package

The Commits page contains the Incoming Commits and Outgoing Commits sections:

TeamExplorerGitCommits

To get that information from a package you need to use the Microsoft.TeamFoundation.Git.Controls.Extensibility.ICommitsExt interface. See the article:

HOWTO: Get the Git Commits in the Team Explorer of Visual Studio from a package

The Changes page contains the Included Changes, Excluded Changes and Untracked Files sections:

TeamExplorerGitChanges

To get that information from a package you need to use the Microsoft.TeamFoundation.Git.Controls.Extensibility.IChangesExt interface. See the article:

HOWTO: Get the Git Changes in the Team Explorer of Visual Studio from a package

The Resolve Conflicts page contains the Conflicts and Resolved Conflicts sections:

TeamExplorerGitConflicts

To get that information from a package you need to use the Microsoft.TeamFoundation.Git.Controls.Extensibility.IConflictsExt interface. See the article:

HOWTO: Get the Git Conflicts in the Team Explorer of Visual Studio from a package

The Commit Details page contains the commit properties and Changes section:

TeamExplorerGitCommitDetails

To get that information from a package you need to use the Microsoft.TeamFoundation.Git.Controls.Extensibility.ICommitDetailsExt interface. See the article:

HOWTO: Get the Git Commit Details in the Team Explorer of Visual Studio from a package

MZ-Tools Articles Series: HOWTO: Get the Builds / Pending Changes in the Team Explorer of Visual Studio from a package

The two first samples that I have created about Team Explorer extensibility are about getting the information contained in the Builds and Pending Changes pages.

The Builds page contains three sections: My Builds, Favorite Builds Definitions and All Build Definitions:

TeamExplorerBuilds

To get that information from a package you need to use the Microsoft.TeamFoundation.Build.Controls.Extensibility.IBuildsPageExt interface. See the following article:

HOWTO: Get the Builds in the Team Explorer of Visual Studio from a package

The Pending Changes page contains the Comment, Related Work Items, Included Changes and Excluded Changes sections:

TeamExplorerPendingChanges

To get that information from a package you need to use the Microsoft.TeamFoundation.VersionControl.Controls.Extensibility.IPendingChangesEx interface. See the following article:

HOWTO: Get the Pending Changes in the Team Explorer of Visual Studio from a package

New TFS Extensibility resources added to VSX site

A question in the MSDN VSX forum prompted me to investigate another area, Team Explorer extensibility, which I am not very familiar with yet. After solving the question, I wanted to learn more about Team Explorer / TFS Extensibility and I found quite a few resources that I didn’t have listed on this VSX site. Some resources that I have updated are:

  • In the Overview page, I have added an image from the MSDN documentation to illustrate the several client models, and clarified that you need the Team Explorer to get the client libraries even if you want a standalone application to connect to TFS.
  • In the Downloads page, I have added the links to download the Team Explorer packages for Visual Studio 2005-2013, which, by the previous paragraph, are required to get the client libraries for standalone applications that don’t extend the Team Explorer. The client model object assemblies and namespaces are quite confusing because some are Microsoft.TeamFoundation.* and some others are Microsoft.VisualStudio.TeamFoundation.*, and are located in at least three folders (ReferenceAssemblies\v2.0, ReferenceAssemblies\v4.5, and PrivateAssemblies of the root folder Program Files (x86)\Microsoft Visual Studio <version>\Common7\IDE). The MSDN documentation for Visual Studio 2012 has a nice mapping between assemblies and namespaces.
  • In the Articles section, I have added a couple of articles to extend the Team Explorer of Visual Studio 2012 / 2013, and an impressive collection of 56 articles about TFS API by MVP fellow Shai Raiten.

In the next posts, I will contribute myself explaining how to get information about the different pages / sections of the Team Explorer.