How to Update Your Outlook Add-In Version

Update Your Software Version in C# Outlook Add-In Code

Photo by Michael Olsen on Unsplash

First, you have to update AssemblyVersion in your main project code.

In “your-project-folder\your-main-project\Properties\AssemblyInfoVersion.cs” file, set as[assembly: AssemblyVersion (“1.0.3.0”)].

The same value will be set in “yaani-email-outlook-dav-synchronizer\YaaniMailOutlookAddIn.Setup\YaaniMailOutlookAddIn.Setup.vdproj” file, too:

"Product"
{
"Name" = "8:YourCompany"
"ProductName" = "8:YourOutlookAddIn"
"ProductCode" = "8:{B2D5717C-9D21-40BA-9BB9-0214E9235382}"
"PackageCode" = "8:{95386BFD-2AE5-4EEE-ADFA-B23048BD90AE}"
"UpgradeCode" = "8:{3A2CBA5C-5ECB-4B41-B78E-218D3CD9FB20}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.3"
"Manufacturer" = "8:YourCompany"

You have to generate new UUID values dor ProductCode and PackageCode (or during install it give an error saying you have already installed the software). For that, you can use the “generator” in Visual Studio: Tools → Create GUID

Run “Build Solution”. After build, right click on your “Setup” project (not your main project) and select “Build”.

You can change parametric property values depending on choice (for Debug or Release) using “SlowCheetah Visual Studio extension”.

“your-project-folder\your-main-project\app.config” default property values will be overriden by “app.Debug.config” and “app.Release.config” file values.

Setup build output (msi ve setup exe files) for Debug will be under “your-project-folder\your-setup-project\Debug” (and under Release folder for Release).

You will need to change your setup file (created by Debug Build) icon manually. For this, from Visual Studio Open → File, you select “setup.exe” file.

From “Add Resource — Icon — Import”, select “InstallIcon.ico” from under your resources path (your-project-folder\your-main-project\Resources). Under Icon folder (shown above), this icon must be the one with the smallest id value. After that, save your changes.

Happy Coding!