0

I am writing an extension for Visual Studio 2015. I had a number of test extensions that I'd try directly, other than in the experimental instance. In fact, a couple of these versions were good enough for my team members to try, which is why I gave them the vsix file each time and had them install it with that.

Problem is that I can't get these to uninstall. I'm not doing anything strange. In fact, most of it is just for a couple of t4 templates. When I run an experimental instance, I keep seeing an old version show up rather than the latest.

I've reset the experimental instance numerous times using :

C:\Program Files (x86)\Microsoft Visual Studio\14.0\VSSDK\VisualStudioIntegration\Tools\Bin>CreateExpInstance /Reset /VSInstance=14.0 /RootSuffix=Exp

But the old version is still in there. If I try to uninstall, it's still in there showing as disabled. If I close the experimental instance and reopen it, it's back. Even after resetting the experimental instance.

So I tried going into the folder with the extensions and deleting all of the ones that have my tests. When I reopened visual studio and clicked on Extensions, it just gave me an error, so I undeleted the folders.

I tried using

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>VSIXInstaller  /u:

with the key for my test. It says it's uninstalling but it doesn't remove the one that's giving me the problem. It does remove the latest one though.

I started checking the registry, and I'm finding a section with "pending deletions" with all the tests I've created. But nothing I do seems to get it to actually process them.

Normally I run visual studio as administrator. I enabled the flag on the shortcut, because some of the projects I work on require it and I don't want to have to remember to use 'run as'. But it doesn't seem to matter. If I run just without it, those 'pending deletions' don't seem to process either.

I'm going to poke around some more but maybe someone else has a solution for this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Have you indicate the identifier when you using VSIX installer to uninstall the extension: VSIXInstaller /q /a /u:{VSIXIdentifier}. https://stackoverflow.com/questions/25234634/how-to-uninstall-a-visual-studio-2013-extension-manually – Leo Liu May 30 '17 at 05:35
  • Yes I indicate the identifier. I just didn't copy it here. I literally stated "with the key", and that it does remove the latest one. –  May 30 '17 at 15:08
  • This is "normal" behavior in VS2015. The extensions directories are only deleted the next time you open VS. I've even seen cases where the directories are not deleted at all. This doesn't the mean that the extension is not uninstalled because it is. I believe that this was what it made MS change the whole extension install/uninstall experience in VS 2017. – Hugo Quintela Ribeiro May 31 '17 at 08:59
  • No, I literally shut down vs and restarted it numerous times and it doesn't delete them. It never deletes them. And if I reset my experimental instance, the old extension that I had "removed" is active in it. –  Jun 01 '17 at 18:30

1 Answers1

2

I've found an old article from 2009 on Daniel Cazzulino's Blog with few simple steps and they seemed to work for me on VS 2017:

Resetting Visual Studio Experimental Instance to its super-clean initial state.

In case the link will ever go dead, I'm pasting an essence:

In order to get a super-clean environment, here’s what you need to do:

  1. Close any running instance of VS Experimental.
  2. Delete the entire folder %LocalAppData%\Microsoft\VisualStudio\10.0Exp
  3. Run regedit.exe
  4. Delete the registry key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp
  5. Delete the registry key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0Exp_Config
  6. Run the command “Reset the Microsoft Visual Studio 2010 Experimental instance” from your start menu.

Few extra notes from me:

  • I didn't have 10.0Exp, I had 14.0Exp and 15.0Exp - I removed both. The probably referred to VS 2015 and VS 2017
  • I wasn't aware that there is such a MS tool "“Reset the Microsoft Visual Studio 2010 Experimental instance” in windows Start menu, but apparently there is :)
infografnet
  • 3,749
  • 1
  • 35
  • 35