Our company recently updated TFS to 2015 update 1. After that context menu item named Drop folder
disappeared from completed builds. I found nothing about it and how to bring it back. When I click Open
on completed build, VS opens web version of TFS where I forced to click through the menus and copy drop folder path manually. So I decided to write a simple extension that will add this item to the menu.
Some googling brought me to this page. But it seems that the example code is quite old and not working in VS2015:
IVsTeamFoundationBuild vsTfBuild = (IVsTeamFoundationBuild)GetService(typeof(IVsTeamFoundationBuild));
IBuildDetail[] builds = vsTfBuild.BuildExplorer.CompletedView.SelectedBuilds;
Property SelectedBuilds
is always empty. I suppose that it relates to old window from VS2010. It returns items that are instance of IBuildDetail
interface.
So I found this piece of code here:
var teamExplorer = (ITeamExplorer)ServiceProvider.GetService(typeof(ITeamExplorer));
var page = teamExplorer.CurrentPage;
var buildsPageExt = (IBuildsPageExt)page.GetExtensibilityService(typeof(IBuildsPageExt));
var build = buildsPageExt.SelectedBuilds[0];
Here build
is the instance of IBuildModel
interface. It lacks DropLocation
property.
Is there any way to found drop location of selected build? Or maybe latest build?