How to tell Visual Studio to load only the extension I'm currently debugging (and nothing more)? -


i've read how debug visual studio extensions.

as fact, vs2013 sets extension project automatically that.

i have number of extensions (also add-ons , on: resharper, ozcode, gitextensions..). of them have slow loading times, obviously.

is there way, run extension debug session on "clean" visual studio? vanilla: nothing installed except extension under debug.

edit: wanted clear little: resharper not loading in experimental hive, other extensions are, though

welcome wonderful world of visual studio extensibility!

in order prepare environment serious extension development, need several things, involving moving installed extensions around , changing visual studio configuration files. below brief explanation process:

prerequisites

before going further, here necessary "knowledge" every extension developer needs posses:

  1. what's pkgdef? - important information visual studio package format
  2. vsix discovery - how visual studio discovers , loads vsix packages
  3. custom hives - running multiple visual studio profiles

first 2 articles old, still hold crucial information. in visual studio 2012 , above, vsix discovery process changed slightly, visual studio not rebuild package cache on every startup. rebuild package cache, run elevated developer command prompt specific version of visual studio:

devenv /setup 

or use undocumented command:

devenv /updateconfiguration 

which not require elevation, rather tells visual studio refresh package cache on next restart.

most of time, extensions install (e.g. resharper, ozcode, other extensions gallery) default install per-machine, placing in %vsinstalldir%\common7\ide\extensions. remember default pkgdef search path (as defined devenv.pkgdef) is:

"pkgdefsearchpath" = $applicationextensionsfolder$;$rootfolder$\common7\ide\commonextensions;$rootfolder$\common7\ide\devenv.admin.pkgdef;" 

this means, whenever start visual studio in hive, first @ per-machine location installed extension, , load them up. whenever create new vsix project, default setting launch in /rootsuffix exp hive, still attempt load per-machine extensions first.

which brings me answering question.

in order prevent extensions loading in other hives, need moved per-hive location: %localappdata%\microsoft\visualstudio\<vsversion><hive>\extensions. later versions of visual studio (2013 , above) allow visual studio settings, need run visual studio administrator work:

however, instead of running administrator, it's possible modify default package search path, include per-user location in it. then, move extensions manually new location.

here's do:

  1. open elevated notepad(++) (right-click - run administrator)
  2. open file devenv.pkgdef, located in visual studio installation directory, e.g. `c:\program files (x86)\microsoft visual studio 14.0\common7\ide\devenv.pkgdef
  3. in pkgdefsearchpath, add $appdatalocalfolder$\extensions;as first value, before $applicationextensionsfolder$, looks this:
  4. save file

now can go common7\ide\extensions folder, , move directories of extensions per-user location. example, if wanted move ncrunch in visual studio 2015, take entire folder remco software, , move %localappdata%\microsoft\visualstudio\14.0\extensions.

finally, refresh visual studio package cache, running 1 of 2 commands above. when visual studio, still load extensions, whenever run hive (exp or other), per-user extensions won't loaded.

it seems involved process, need once, , "huge" extensions (mainly, resharper). note since v9, resharper installs per-hive, don't have anymore!

sorry long explanation, hope helps!


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -