How to change vsix default installation location

6.2k Views Asked by At

I'm developing a Visual Studio extensibility project using VSIX. By default, the VSIX file will install the assemblies in one of the following folders:

C:\Users\<UserName>\Appdata\Local\Microsoft\VisualStudio\10.0Exp\Extensions\Microsoft\<GPName>
C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft p&p\<GPName>

Is it possible to change the output location?

2

There are 2 best solutions below

0
On

You can always easily find your own assemblies:

  • you instantly get the correct path by typeof(MyPackage).Assembly.Location and calculate paths to other assemblies bundled within your package. But, I think this will not work if the package was registered into GAC
  • you may use myPackage.UserLocalDataPath the VS will return you the correct (blah)/Extensions directory, located somewhere in (youruser)-(appdatalocal) folder, and then you may scan deeper into your folders and folders of other packages

It may sound like a lot of work - but it isn't; couple of lines, x-teen at most.

0
On

No it's not possible. The VSIX installer chooses where to place your assemblies and the VSIX has no input into this process