How to manually register the VSPackage installed via MSI at localAppData location

823 Views Asked by At

I created a VS package and trying to install it via MSI. I don't want to use .vsix file, so deploying the required files to %localAppData%\Microsoft\VisualStudio\10.0\Extensions. will install the vs package but the extension manager shows package as [Disabled]. I know that we should make an entry to registry to get rid of this but I am not sure about the registry value content.

I created .reg file with following content:

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ExtensionManager\EnabledExtensions]
"MyPackage,1.0.0"=hex(2):25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,\
  00,61,00,74,00,61,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\
  66,00,74,00,5c,00,56,00,69,00,73,00,75,00,61,00,6c,00,53,00,74,00,75,00,64,\
  00,69,00,6f,00,5c,00,31,00,30,00,2e,00,30,00,5c,00,45,00,78,00,74,00,65,00,\
  6e,00,73,00,69,00,6f,00,6e,00,73,00,5c,00,54,00,68,00,6f,00,6d,00,73,00,6f,\
  00,6e,00,20,00,52,00,65,00,75,00,74,00,65,00,72,00,73,00,5c,00,50,00,72,00,\
  6f,00,70,00,65,00,72,00,74,00,79,00,57,00,69,00,6e,00,64,00,6f,00,77,00,50,\
  00,61,00,63,00,6b,00,61,00,67,00,65,00,5c,00,31,00,2e,00,30,00,5c,00,00,00

Then imported this file in Registry editor of my visual studio setup project. The entry made to windows registry after msi installation looks like like follows:

"#%%LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\[Manufacture]\[ProductName]\[Version]\

Any pointer will be helpful.

1

There are 1 best solutions below

0
On

Your answer can be found here. Basically you don't create registry content yourself - special tool called RegPkg does that for you. First, create your package, i.e. dll. Then use RegPkg to create reg file from dll. Import the reg file to your MSI project, replace hard-coded paths with variables and you are ready to go. RegPkg is shipped with Visual Studio SDK.