I want to install my VSIX with an msi using WiX.
i have the folowing code in my wxs file
<Component Id ="cmp_WiXGenPackage">
<File Id="fil_WiXGenPackage" Source="$(var.WiXGenerator.VSIX.TargetDir)VSExtension1.vsix" KeyPath="yes" Vital="yes">
<VSExtension:VsixPackage PackageId="WiXGenerator.VSExtension.52858d9a-5c32-4661-926d-66271a65cbba" Vital="yes" Permanent="no" />
</File>
</Component>
When i build the project i get a nice msi as expected but when i try to execute it, it crashes. below is the most interesting part of the log and shows, what i think creates the error:
MSI (s) (94:7C) [18:15:45:956]: Executing op: CustomActionSchedule(Action=vim6D68CD66793FF0B87E58724E51ABAE73,ActionType=3122,Source=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VSIXInstaller.exe,Target=/q "C:\Program Files (x86)\[ProductManufacturer]\WiX Generator\VSExtension\VSExtension1.vsix" /admin,)
CustomAction vim6D68CD66793FF0B87E58724E51ABAE73 returned actual error code 1001 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (94:7C) [18:15:46:862]: Note: 1: 1722 2: vim6D68CD66793FF0B87E58724E51ABAE73 3: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VSIXInstaller.exe 4: /q "C:\Program Files (x86)\[ProductManufacturer]\WiX Generator\VSExtension\VSExtension1.vsix" /admin
MSI (s) (94:7C) [18:15:46:862]: Note: 1: 2205 2: 3: Error
MSI (s) (94:7C) [18:15:46:862]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1722
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action vim6D68CD66793FF0B87E58724E51ABAE73, location: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VSIXInstaller.exe, command: /q "C:\Program Files (x86)\[ProductManufacturer]\WiX Generator\VSExtension\VSExtension1.vsix" /admin
MSI (s) (94:7C) [18:15:48:125]: Note: 1: 2205 2: 3: Error
The problem is it uses the VS 11 VSIXInstaller and im building a VS12 VSIX. When i run the vsix with the VS12 version of VSIXInstaller it will install with no problems.
real question: Is there a way to instruct WiX to use the vs12 version?
i know the VSIXPackage element has attributes to identify the version but that can only be used for versions lower than the VSIXInstaller
Im using WiX Toolset version 3.8
P.S. I know some of u are against using a MSI for installing VSIX but none of the above asks for this feedback so please provide no such comments
VsixPackage has two attribute that let you set the version of Visual Studio that you want to install the extension and the type of visual Studio. For example if you set the attributes like this way: Target="integratedShell" TargetVersion="12.0", you are telling to the installer that execute the extension to be installed to Visual Studio 2013 of type IntegrateShell. More info about the values that you can set in these attributes you can find them in this page VsixPackage info