Friday, 23 September 2016

Visual Studio 2015 Professional - Solving license issues

We have some Visual Studio 2015 Professional licenses as a Microsoft Partner through the Microsoft Action Pack scheme. Microsoft have made this really "fun" to work with by, instead of simply giving you a product key, requiring that the VS users are all defined as "Technical Contacts" in the Partner Center.

Then, it's simply a matter of taking the Technical Id you are given from that portal, and linking it to your MSDN account.

Then, it's simply a matter of logging into Visual Studio using that MSDN account.

... Until it stops working.

... Until one day, you simply want to get on with some work, and Visual Studio says, "This copy is not licensed." and won't let you do anything.

Trying to tell it to refresh the license resorted in this simple error, "Could not download a license please check network connection or proxy settings." Great. Thanks. No clues there, then.

I have spent hours on this. I tried installing Update 3. I tried repairing Visual Studio. I tried completely uninstalling and reinstalling Visual Studio (this one was at the suggestion of a Microsoft support rep - "Do you know how long that takes!?" I asked him; "I have no idea, I am not a technician," he replied). I tried searching Microsoft forums, Google, following random bits of advice on the internet.

Eventually, I resorted to using good old procmon.

I found that when hitting the "Check for an updated license" link, Visual Studio checks the HKEY_CURRENT_USER\Software\Microsoft\VSCommon registry key.

So, I exported a backup of the key (ALWAYS DO THIS FIRST!) and then I deleted the parent key of anything I could see that included the email address bound to my Microsoft Account, and anything that looked account-related.

This included things under:

  • VSCommon\14.0\ClientServices
  • VSCommon\ConnectedUser
  • VSCommon\KeyChain\Accounts
The next time I ran Visual Studio, I had to log in again, but after that, lo and behold!

Finally! PHEW!

1 comment:

  1. Today, I went to the beachfront with my kids. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is totally off topic but I had to tell someone! yahoo login mail