visual studio - Registering an unpacked VSIX extension via MSI without using devenv /setup -


we have visual studio extension, installed msi, since need perform tasks after installation (ngen, registering com servers, etc). in end of installation, run devenv.exe /setup (more specifically, devenv.exe /setup /nosetupvstemplates make bit faster) register extension in visual studio 2012 , above (in 2010 step not required, since vs2010 rebuild extensions cache on every startup).

we're looking move partial vsix installation, there issues:

  1. we have folder structure (additional bundled tools). wasn't able find option include arbitrary folders , files in vsix package. possible?

  2. we're trying avoid using devenv.exe /setup, since in rare cases, may cause extensions not load (as detailed remco mulder on msdn forums).

  3. we still need perform "post-installation" operations, not possible vsix.

  4. due previous 'sins', hardcoded of paths use companyname\productname\version format vsix packages used to follow, seems vsix randomy generate folder name (as jason mentions in answer below).

so i'd able install "unpacked" vsix package - have msi installer create file structure on disk (in correct location, %vsinstalldir%\common7\ide\extensions\company\product\version), , somehow have vsix consume .vsixmanifest file register extension in visual studio.

(initial digging extension manager api shows there's method called createinstalledextension in extensionmanagerservice takes in path vsixmanifest, in assembly microsoft.visualstudio.extensionmanager.implementation.dll, unfortunately internal).

so, without resorting api hackery, there alternative way install extension in visual studio (2012 , above), without using devenv /setup?

as jason (and else) suggests - yes, "correct" (supported) way of registering visual studio package externally running devenv.exe /setup, , part - works without problems (albeit slow, due entire visual studio configuration being rebuilt).

this commercial product, , every once in while support case, complaining after installing our extension, bad happened in visual studio - other extensions failed load, problem solution explorer, etc. cases rare, happen.

in attempt minimize impact installing our extension user's machine, trying find suitable way use vsix installation mechanism not use devenv.exe /setup, unfortunately, there isn't supported scenario handles issues i've raised in question above.

after extensive research problem, found undocumented, unsupported solution solves problem completely! empty file, called extensions.configurationchanged, located under %vsinstalldir%\common7\ide\extensions gets touched every time vsix package installed or uninstalled, causing visual studio refresh it's package cache (only!) on next restart! modifying file's "last modified date", cause visual studio act if vsix package installed or uninstalled.

a few quick experiments of copying extension files empty hive, , touching extensions.configurationchanged cause visual studio load extension (and process .pkgdef files) on next restart - no devenv /setup necessary!

several commercial products offer solution in troubleshooting section of online help, dealing loading failure of extension, solution might "lesser evil" looking for.

use @ own risk.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -