Wednesday, 18 November 2015

Web Essentials 2015 extension keeps being disabled

I noticed recently that Visual Studio 2015 wasn’t loading the Web Essentials extension. Checking in the Extensions and Updates dialog revealed the problem – it was disabled.

Visual Studio Extensions and Updates dialog, showing disabled extension

But I hadn’t disabled it! So I re-enabled it, restarted Visual Studio and got on with my life…. Until I next started Visual Studio and it was disabled again. Grrr.

Next stop, “Captain Google” – which brought me to a closed issue on GitHub. So it isn’t just me, but no reliable solutions to the problem (yet).

What about running Visual Studio with logging? I did this, re-enabled the extension and chose Restart. Looking at the second log file revealed the following interesting lines:

511 ERROR Extension will not be loaded because an extension with the same ID 'Microsoft.Dev14.VsixTemplatesPackage.443cca91-ec20-41e5-a165-f28e56b89650' is already loaded at C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\DSDWKUM5.2Y2\...
          C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\NUGETIFIEDEXTENSIBILITYTEMPLATES\
Extension Manager 2015/11/17 23:55:46.703
512 ERROR Extension will not be loaded because an extension with the same ID 'Microsoft.VisualStudio.TeamFoundation.TeamExplorer.Extensions' is already loaded at C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\H0JHYFM3.2KP\...
          C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TEAMFOUNDATION\TEAM EXPLORER\
Extension Manager 2015/11/17 23:55:46.703
513 ERROR Extension will not be loaded because an extension with the same ID '3c61cbb3-7795-4afc-981b-34ea36a333fa' is already loaded at C:\USERS\DAVID\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\YKUJN0FP.3MY\...
          C:\USERS\DAVID\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\OVNEVZLB.FXP\
Extension Manager 2015/11/17 23:55:46.703
514 ERROR Extension will not be loaded because an extension with the same ID '5fb7364d-2e8c-44a4-95eb-2a382e30fec9' is already loaded at C:\USERS\DAVID\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\LG5OBJ45.EKL\...
          C:\USERS\DAVID\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\PMHVMCOV.BWZ\
Extension Manager 2015/11/17 23:55:46.703

Checking the folders above maps to the following extensions:

  1. Visual Studio Extensibility Templates
  2. Team Foundation Team Explorer Extensions
  3. Cloud Explorer for Visual Studio 2015
  4. Web Essentials 2015

The first two are interesting in that they’re both under C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE. A closer look here reveals that in both cases, the second folder is actually a shortcut that points back to the first folder, so there isn’t really a conflict here – just Visual Studio having to process the same exact folder twice.

The 3rd item is interesting in that I hadn’t notice a problem with Cloud Explorer, but that’s probably because I hardly ever use it. But sure enough, checking back in Extensions and Updates showed that it too was disabled.

Ok. So I selected both Cloud Explorer and Web Essentials, chose Uninstall and restarted Visual Studio. And they were still there! (Zombie Extensions?!!). But I can see how this would be. The duplicates did get removed, but this left the other extensions still there.

Extensions and Updates 2

Righto.. Once more with feeling! Select each extension, choose Uninstall and restart Visual Studio.

Check Extensions and Updates again. Hooray – they’re really gone now.

Now re-install both extensions and really get on with life Smile

6 comments:

Remco Ros said...

I ran into this with other extensions as well.

I write a little command line tool to find, show and delete duplicate (old) extensions.

Source here: https://github.com/remcoros/DuplicateExtensionFinder

Hope this helps anyone.

Roland Zwaga said...

Yup, your little tool just helped me a lot, turned out I had a whole list of extensions with multiple versions installed.
(I usually have multiple instances of VS open, so I'm guessing this is why these versions tend to hang around).

But your little gadget made it really easy to kill the duplicates, so thanks dude!

Regin Larsen said...

Thanks! :)

I had this issue with VsVim, and it was driving me crazy that it kept getting disabled.

Krisztián Czene said...

Thanks a lot!
It's a very interesting visul studio error and the fixing method is work fine :)

Adilson Manzoli Jr said...

+1 Remco Ros.. your code works!! tanks!!!

Rico said...

Thanks a lot, finally the extension is starting at first try :)