- HOW TO GET TFS ON VISUAL STUDIO 2008 HOW TO
- HOW TO GET TFS ON VISUAL STUDIO 2008 UPDATE
- HOW TO GET TFS ON VISUAL STUDIO 2008 CODE
/ Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. M_tfsExt.ProjectContextChanged -= new EventHandler(m_tfsExt_ProjectContextChanged) Unhook the ProjectContextChanged event handler. Public void OnDisconnection(ext_DisconnectMode disconnectMode, ref Array custom) / Array of parameters that are host application specific. / Describes how the Add-in is being unloaded. Receives notification that the Add-in is being unloaded. / Implements the OnDisconnection method of the IDTExtensibility2 interface. M_tfsExt_ProjectContextChanged( null, EventArgs.Empty) Run the event handler without the event actually having fired, so we pick up the initial state. If ( null != m_tfsExt.ActiveProjectContext) M_tfsExt.ProjectContextChanged += new EventHandler(m_tfsExt_ProjectContextChanged) M_tfsExt = _applicationObject.GetObject( “”) as TeamFoundationServerExt Public void OnConnection( object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) / Describes how the Add-in is being loaded. Receives notification that the Add-in is being loaded. / Implements the OnConnection method of the IDTExtensibility2 interface.
HOW TO GET TFS ON VISUAL STUDIO 2008 CODE
Place your initialization code within this method. / Implements the constructor for the Add-in object. / The object for implementing an Add-in. There’s only one per TfsTeamProjectCollection the same holds true for WorkItemStore, IBuildServer, or any of the other client object model services you may be familiar with. Once we have it, we can call GetService to request the VersionControlServer object. By the time the ProjectContextChanged event fires, the ActiveProjectContext.DomainUri property has already been updated.Īll the services in the TFS client object model are owned by the TfsTeamProjectCollection. The cache is keyed by URI - which (handily) is provided by TeamFoundationServerExt. While that extensibility point won’t give you the TfsTeamProjectCollection object directly, we can ask the TfsTeamProjectCollectionFactory’s static GetTeamProjectCollection method to retrieve it from a runtime cache. The trick here is to hook the ProjectContextChanged event on the TeamFoundationServerExt extensibility object. But the framework shown in this piece of sample code is generic - you can use it to get the very same VersionControlServer or WorkItemStore object that our integration is using to connect to TFS. In this particular case the customer wanted to hook the BeforeCheckinPendingChange event from the VersionControlServer object and take a specific action when that occurred. We recently had a request from a customer for a VS add-in that would be able to access the same TfsTeamProjectCollection and VersionControlServer objects that our own UI integration (such as the Team Explorer and Pending Changes toolwindow) are using. I thought I’d post since others may find it useful.
HOW TO GET TFS ON VISUAL STUDIO 2008 HOW TO
NOTE: If you are a project manager that will be creating new Team Projects or perform other administrative tasks and only have Visual Studio 2008 available, it is highly recommend that you have the Microsoft Visual Studio 2010 Shell that's available by downloading and install the Microsoft Visual Studio Team Explorer 2010 - ISO on your system.Philip, a dev on version control, recently helped with a question on how to get the TFS objects we use in our UI.