Outlook: Deploying a VSTO add-in using Visual Studio 2019 Installer (MSI) No ratings yet.

The easiest way to deploy Outlook VSTO add-ins is using ClickOnce, but it is also possible to create a Setup package for distribution. Previous versions of Visual Studio used InstallShield LE, but in Visual Studio 2019 you can use the Microsoft Visual Studio Installer Projects extension.

The process described here will create both a Setup.exe and Setup.msi.

The first step is to install the Microsoft Visual Studio Installer Projects extension as per step 7 in this guide. Once installed, a Setup project can be created as follows.

Add Setup Project ScreenshotAdd a new Setup project to your Outlook add-in solution.
Setup File System windowYou’ll be taken to the File System view of the Setup project first of all.
File System window with primary output and files addedTo add the files that need to be installed, right-click Application Folder, then select Add… Project Output… Choose the primary output of your VSTO add-in project. You’ll also need to manually add the .vsto and .manifest files for the add-in from the output directory.
Screenshot of registry configuration windowRegistry keys can be set using the Registry view. Visual Studio automatically sets the registry keys for your add-in when it is run in debug mode, so usually you can just use those. You can add any other your add-in needs as well.
Note that for an add-in to be available to all users, it needs to be registered into HKLM – registering it into HKCU will make it available only for the current user. It makes sense for an installer to use HKLM (for user deployment, ClickOnce should be easier).
Screenshot of the User Interface windowThe User Interface window can be used to customise the messages displayed during Setup.
Screenshot of the Setup project propertiesEdit the Setup project properties to change fields such as manufacturer, product name, and author.
The final step is simply to build the Setup project. This is done as any other project (from the build menu or solution explorer). Once built, you’ll find the Setup.exe and Setup.msi package in the output folder. You can now take these and test the install on another machine

Please rate this

0

Leave a Reply

Your email address will not be published. Required fields are marked *