4

I have noticed the following behavior of Visual Studio 2012: I create VS2012 Package Project (from SDK). When I compile and run it, an experimental VS instance is launched, so I can test implemented package. But If I uninstall package from experimental VS instance (using Tools -> Extensions and Updates -> Uninstall), then I try recompile and rerun package, I get compilation error without any errors shown in Output and Error List. Thus, it is impossible to launch my package under development again. This issue can be reproduce with every newly created VS2012 Package Projects.

In summary, I am not able to run my Package in experimental VS Instance, because I previously uninstalled it. It appears to be a packages metadata caching problem. How can I solve this issue?

Edit:

Steps to reproduce this problem:

  1. Create new Visual Studio 2012 Package Project (VS2012 SDK have to be installed).
  2. Compile and run project. VS Experimental instance should be launched.
  3. In VS Experimental instance, go to Tools -> Extensions and Updates, and uninstall just created extension.
  4. Close VS Experimental instance.
  5. Try to compile and run Package project again. There should be compilation or launch errors, but no information in Output neither Error List.

At this moment it is impossible to run VS Experimental instance with this Package Project again.

sgnsajgon
  • 664
  • 2
  • 13
  • 56
  • http://stackoverflow.com/q/15747387/270315 – jwaliszko Oct 01 '13 at 22:45
  • It's a good solution. The other workaround is to install Package from generated `*.vsix` file from `bin\debug` directory, and then uninstall it. But now I have a next problem - I compile Package and try to launch it in VS Experimental Instance, then I get error message - "A project with Output Type of Class Library cannot be started directly". It's weird message because it's a right and default Output Type for this kind of project. – sgnsajgon Oct 02 '13 at 12:16
  • There is a workaround for above problems - compile a package project, reset and start VS Experimental Instance from command line or from Windows Start panel (Start -> All Programs -> Microsoft Visual Studio 2012 -> Microsoft Visual Studio SDK -> Tools -> [reset/start options]). Developed package should be loaded in VS Experimental Instance environment. – sgnsajgon Oct 02 '13 at 12:24
  • Probably project settings have gotten screwed up, `.user` file for the project was accidentally modified or deleted . Open Project->Properties, go to the Debug tab, make sure 'Start External Program' is checked and the path to VS is in the box, so something like this `C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe` and that the Command Line Arguments box has this value `/rootsuffix Exp` – sgnsajgon Oct 03 '13 at 07:38

2 Answers2

7

The "nuke from orbit" option is always to completely delete the folders:

C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\11.0Exp
C:\Users\[username]\AppData\Roaming\Microsoft\VisualStudio\11.0Exp
Jason Malinowski
  • 18,148
  • 1
  • 38
  • 55
  • Here's some info for Visual Studio 2013, and also applicable to VS 2015, that saved me: http://www.codeproject.com/Tips/832362/Resetting-the-Visual-Studio-Experimental-Instance – RenniePet May 12 '16 at 16:12
  • Works like a charm, but be prepared to major slowdown at first run of experimental instance – Regis Portalez Mar 30 '18 at 12:38
2

Do these steps:

1 - Close Visual Studio

2 - Reset the Visual Studio SDK experimental instance: find the Microsoft Visual Studio 2012/Microsoft Visual Studio SDK/Tools folder, and then select Reset the Microsoft Visual Studio 2012 Experimental instance.

3 - Open your project in Visual Studio.

4 - Increase the version in your .vsixmanifest file.

5 - Clean and Rebuild the solution.

Note usually only Step 4 could solve the problem.

A-Sharabiani
  • 17,750
  • 17
  • 113
  • 128