For a standard VS add-in project:
When the add-in is connected, the DTE-object is provided and stored in the variable _applicationObject
. The method GetObject
can be used to retrieve the current TFS connection data (project collection url, project name):
TeamFoundationServerExt tfsConn = _applicationObject.GetObject("Microsoft.VisualStudio.TeamFoundation.TeamFoundationServerExt") as TeamFoundationServerExt;
In order to use the TeamFoundationServerExt
class, a reference to the assembly Microsoft.VisualStudio.TeamFoundation is required. It is located in:
C:\Program Files (x86)\Microsoft
Visual Studio
10.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.TeamFoundation.dll.