Fix TFS Sidekick 2015 to work without VS2015

This week I finally installed Windows 10 on my main laptop at work (which is 3 years old now) paving over my old Windows 7 install.  Overall the install/upgrade was super easy, fast and the results are amazing.  Its like a brand new laptop again.  I would definitely recommend updating if/when you have the appropriate license.

Knowing VS2017 is releasing next week, I decided to not install VS2015 or other older versions and try the VS2017 RC instead and then later update to the RTM version when its available.  After a couple days this proved to be no problem for any of my VS solutions.

Then we had a corrupt TFS workspace issue in one of our CD pipelines so I reinstalled the trusty TFS Sidekick 2015 to delete it.  (All TFS admins should have this amazingly useful tool installed.)  As you might expect I received the following error when starting the utility:

image

Time to Troubleshoot

A quick look at the event log provides the underlying error:

image

Application: Attrice.TeamFoundation.Sidekicks.12.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at Attrice.TeamFoundation.Sidekicks.ApplicationMain.GetVisualStudioPath()
   at Attrice.TeamFoundation.Sidekicks.ApplicationMain.GetTeamFoundationPath()
   at Attrice.TeamFoundation.Sidekicks.ApplicationMain.Main()

So we need to know what is causing the NullReferenceException.  Telerik’s Just Decompile to the rescue!  Opening the Attrice.TeamFoundation.Sidekicks.12.exe file and searching for “GetVisualStudioPath” yields the following method:

image

Here we can see the application is trying to open the HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0_Config key and access the InstallDir value.  This key/value doesn’t exist in my registry, I assume because I haven’t installed VS2015.  So I added it and set the value to the Sidekick directory:

image

Assembly References

That resolved the null reference but I still received the following error when trying to start Sidekicks:

image

Failed to establish connection.Could not load file or assembly ‘Microsoft.TeamFoundation.Client, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.

So it looks like the Sidekicks is missing TFS assemblies from the VS2015 install.  Again JustDecompile confirmed which assemblies were missing:

image

After checking all the DLLs I found there were about 30 TFS/VS assemblies that Sidekicks needed through the tree of assemblies referencing other assemblies.  I started looking around and found these are available via a couple Nuget packages.  Unfortunately, no one package contained all the missing assemblies.  In the end I found all files I needed in the following packages:

  • Microsoft.TeamFoundationServer.ExtendedClient.14.95.3
  • Microsoft.VisualStudio.Services.InteractiveClient.14.95.3
  • Microsoft.VisualStudio.Services.Client.14.95.3

I had most of these on my box for other projects but you could also download the packages manually from nuget.org if needed.  After copying these to the Sidekicks program folder the app runs as expected.

image

So at least for now, I only have VS2017 installed.  Hope this helps others!

6 thoughts on “Fix TFS Sidekick 2015 to work without VS2015”

  1. i am using vs2017 community edition and tried to install the packages you listed, however when I got to the last one, it wouldn’t install. giving me a compatibility error with the previous package install. is there a way to get these dll’s or do I need to install vs 2015?

      1. I don’t recall the exact issue but it said something like the last one was incompatible with another install (the second one)

Leave a Reply