Visual Studio 2013 *-package did not load correctly

Today for no reason I’ve faced a quirk from Visual studio: on attempt to connect to TFS I faced with strange error: Page not found.. And projects did load but with bunch of errors, like Microsoft.VisualStudio.Web.PasteJson package did not load correctly and many other saying that other packages did not load correctly.

Quick googling revealed that reinstall of VS helps, but I did not fancy that – too much hassle. Further googling also suggested that runnig as admin devenv /setup from your command line should fix the issue. And it did! Thanks to this answer on SO.

Also there was a suggestion to run devenv /resetuserdata if the above fails. But I have not tried that, because the first option worked for me.

And since I’m talking about devenv, here is the list of all the switches applicable to Visual Studio 2013.

You can see there options like /build or /clean or /rebuild – these do not start up Visual Studio, but rather work as Msbuild – build/clean/rebuild solutions. The more useful flags are

  • /safemode – start VS in Safe Mode. In case one of the extensions messes up big time.
  • /ResetSettings – resets user settings to default
  • /setupForces Visual Studio to merge the resource metadata that describes menus, toolbars, and command groups, from all available VSPackages. Whatever it means, but it fixes problems I’ve described above with loading packages.