I am currently working on upgrading an extension that uses TFS Client API to analyze different query result. The analyze command is invoked on right click menu of any saved workitem query/query folder thus uses Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll.
Till date (till VS2013) we were using below function
string GetCurrentlySelectedQueryByIWorkItemQueriesExt()
{
string returnPath = string.Empty;
var teamExplorer = (ITeamExplorer)(this.GetService(typeof(ITeamExplorer)));
var wiQueriesExt = teamExplorer.CurrentPage.GetService<IWorkItemQueriesExt>();
if (null != wiQueriesExt)
{
var selectedItem = wiQueriesExt.SelectedQueryItems.FirstOrDefault();
returnPath = selectedItem.Path;
}
return returnPath;
}Now in developer installation, in Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll(file version 14.95.25118.0), IWorkItemQueriesExt is replaced byIWorkItemQueriesExt2 . We made changes accordingly and prepared the package. It is working fine in developer machine.
However in test installation, it failed to load IWorkItemQueriesExt2 as in Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll is with file version 14.0.23102.0 and a quick look in ILSpy indicate IWorkItemQueriesExt2 is not there.
I looked in Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.dll is with file version 14.95.25118.0 and there IWorkItemQueriesExtimplementation returns "Enumerable.Empty", so can't use IWorkItemQueriesExt
The test installation was done a month before installation in development system
- I checked for viusual studio version from Help -> About & also installed updates . Found no difference. Both VS version is 14.0.25123.00 update 2 (KB3022398) and both have KB3151378
- I found a package "TeamExplorer.vsix" under "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions" which is different for each installation (in test machine it is older and of 156 mb where as in developer machine it is 160 mb and newer)
So my best guess is while installation, older installation picked up old "teamexplorer.vsix" and newer installation picked up newer version & unfortunately there is a breaking change.
So my question is how I can upgrade the older installation to have newer version of teamexplorer, except copy and install TeamExplorer.vsix from dev machine to test machine. (Distributing some internal file of 160 mb to client machines is not a good idea)
Also as of now it is not allowed to install update 3 in organization.