VSIX and MSI
VSIX is a new technology created for deploying Visual Studio extensions. It’s a zip file that uses the Open Packaging Convention. By renaming the file extension of any .VSIX file to .ZIP, you can open up the file in Windows Explorer and take a look at the contents.
I’ve written a separate post about the details of a VSIX and one of our MVPs, Istvan Novak and I gave a talk at the VSX Developer’s Conference last week about general extension deployment. Istvan was gracious enough to post the transcript of our talk.
After the talk, several VSX partners asked me to go into more details on how they can deploy their extensions using an MSI but still play in the VSIX space and show up in the Extension Manager.
Our recommendation is to ship your product as a VSIX but we understand there are limitations preventing you from doing that such as legacy requirements to support older tools that expect files to be in a specific location, configuring an IIS server or Database on install, or supporting VS 2005, 2008 and 2010 all within a single installer.
If you have to use an MSI, we want to make sure the MSI gets the exposure it needs and plays nicely with the Extension Manager. Here are some tips to follow to ensure that:
- Create an extension.vsixmanifest and add it to your MSI. To create a manifest file, take an existing file from another VSIX or install the Visual Studio SDK and create a new VS extension. When you build the extension, the extension.vsixmanifest is created for you.
- In the ID section of the manifest, add the following tag:
Adding this tag will tell the Extension Manager that the extension came from an MSI and not to allow the user to enable, disable, or uninstall it through the Extension Manager, since that could cause problems with the other files still installed via the MSI.
3. If you have any registry keys that get written under the Visual Studio registry have, create a .pkgdef file instead of using the MSI to write the registry keys for you. To create a pkgdef file, create a tool window or menu command using the Visual Studio Integration Package template. Use that as an example pkgdef file to include in your MSI.
4. Drop your files under %VSInstallDir%Common7IdeExtensionsYour CompanyYour ProductVersion. Use a registry look up under HK:LMSoftwareMicrosoftVisualStudio10.0Setup to find the install path of Visual Studio and substitute that with %VSInstallDir%. (Check out MSI Registry look up for more information if you need to create one).
By following these best practices, your customer can still get a great extension experience and see your extension in the Extension Manager.
You can also upload your MSI to the Visual Studio Gallery and have it appear in the online tab of the Extension Manager.
Quan To | Program Manager | Visual Studio Platform