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:
Time to Troubleshoot
A quick look at the event log provides the underlying error:
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
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:
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:
That resolved the null reference but I still received the following error when trying to start Sidekicks:
Failed to establish connection.Could not load file or assembly ‘Microsoft.TeamFoundation.Client, Version=18.104.22.168, 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:
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:
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.
So at least for now, I only have VS2017 installed. Hope this helps others!