http://blogs.clariusconsulting.net/pga

Pablo Galiano's Blog

Go Back to
pga′s Latest post

Deploying a VSIX from a MSI

***Disclaimer: This information applies to Visual Studio 2010 Beta 1 only.***

 

Let’s say that we want to deliver our extension with a installer. How we can easily deploy our VSIX?

The VSIXInstaller tool supports the /quiet switch. That means that we can just have a custom action that calls the tool from within our msi:

<Property Id="VSINSTALLDIR">
  <RegistrySearch Id="VSInstallRegistry" Root="HKLM" Key="SOFTWARE\Microsoft\VisualStudio\10.0" Name="InstallDir"  Type="directory" />
</Property>

 

<CustomAction Id="SetVSIXInstaller" Return="check" Execute="immediate" Property="VSIXInstaller" Value="[VSINSTALLDIR]VSIXInstaller.exe" />

<CustomAction Id="DeployVSIX" Property="VSIXInstaller" Execute="deferred" Impersonate="no" ExeCommand="/quiet" Return="asyncWait"/>

 

<InstallExecuteSequence>
  <Custom Action="Set_SetVSIXInstaller" After="ValidateProductID">VSIXInstaller=""</Custom>
  <Custom Action="DeployVSIX" After="MsiPublishAssemblies" />
</InstallExecuteSequence>

Pablo

Comments