Renat Tlebaldziyeu

Deploying per-user Office extensions via ClickOnce

In part 4 of the deployment series I will show you how to deploy your per-user Office extension using ClickOnce. Before we proceed, I recommend that you read Part 1 for a brief overview of all deployment technologies.

Step 1. Set RegisterForAllUsers = false

If you develop a per-user COM add-in, RTD server or smart tag, set the RegisterForAllUsers property of the add-in module, RTD server module, or smart tag module to False. If you develop an Excel add-in (XLL add-in or Automation add-in) go to Step 2 below.

Before you modify the RegisterForAllUsers property, you must unregister the add-in project on your development PC and make sure that adxloader.dll.manifest is writable.

To access the RegisterForAllUsers property in the Properties window, click the designer surface of the module:
Set RegisterForAllUsers = false

Step 2. Fill the Assembly information

Fill in the obligatory fields of the Assembly information as shown in the screenshot below:

Assembly information dialog

Step 3. Build your project

To support 32-bit and 64-bit Office, set the Platform target property to Any CPU before building your project.

Set the Platform target property

If you use a 32bit component in your Office extension (say a native-code DLL, ActiveX DLL , or .NET assembly), you have to compile it for the x86 platform. Please keep in mind that such an Office extension will work in 32bit Office 2000-2016 only and will not work in 64bit Office 2010-2016. Similarly, if you use a 64bit component, you have to compile the project for the x64 platform but your Office extension will work in 64bit Office 2010-2016 only.

Summing up, if you use a bitness-aware component, your extension will work for Office versions of that bitness only.

Step 4. Open the publish dialog

Select your project in the Solution Explorer window and choose Publish ADX Project in the project context menu.

Publish ADX Project menu item

In the opened Publish dialog, switch to the ClickOnce deployment tab.

Publish dialog, ClickOnce deployment tab

Step 5. Populate files

Click the Populate button. This creates the Publish\{AssemblyVersion} folder and copies all files and dependencies of the Office extension (as well as the Add-in Express loader and its manifest) into that folder.

Publish directory

Step 6. Add additional files (optional)

To publish additional files and/or folders, copy the files and folders required by your project to the Publish/<AssemblyVersion> folder and click the Populate button again.

Step 7. Set application icon (optional)

You can add a .ico file and mark it as Icon File in the Type column of the Files listbox. This icon will be shown in the ClickOnce installer window and Windows Start menu.

Set application icon

Step 8. Set the “Provider URL”

In the Provider URL field, enter the location of the deployment manifest using one of the following formats:

  • a web site: http://<>/<deployment manifest name>.application
  • a Virtual Directory: http://localhost/<deployment manifest name>.application
  • an FTP server: ftp://<>/<deployment manifest name>.application
  • a file path: C:\<folder>\<deployment manifest name>.application
  • a UNC path: \\<server>\<deployment manifest name>.application

<deployment manifest name> must be in the lower case.

Step 9. Sign the installer files

Browse for the existing certificate file (.pfx or .p12) or click New to create a new one. Enter the password of the certificate if there is any.

Step 10. Set preferences (optional)

Click the Preferences button to open the following dialog window:

Preferences dialog

In this dialog, you can allow showing your custom or the built-in UI and specify the Support Location, which will provide users with additional information about your product in the Add/Remove dialog (called Programs and Features since Vista).

Step 11. Prerequisites (optional)

Click the Prerequisites button to specify the prerequisites of your Office extension.

Prerequisites dialog

Step 12. Click the Publish button

Upon clicking the Publish button the wizard generates (updates) the manifests:

Deployment manifest – <SolutionFolder>/Publish/<projectname>.application

Application manifest – <SolutionFolder>/Publish/<AssemblyVersion>/<ProjectName>.exe.manifest

Publish directory

Step 13. Upload files and folders

Upload the following files and folders to the location you specified in the Provider URL field:

– files and folders of the Publish\{AssemblyVersion} folder;

– the deployment manifest ({projectname}.application);


For testing purposes, you can just double-click the deployment manifest in Windows Explorer.

Step 14. Running the installer

To run the installer, the user needs to open the deployment manifest (<projectname>.application) in Internet Explorer or Windows Explorer.

Runing the installer

In the “Application Install – Security Warning” dialog you click the Install button.

Application install - Security Warning

Clicking the Install button opens the ClickOnce installer window (see the screenshot below):

ClickOnce installer window

Users will see this dialog when the installation is completed successfully:

Registration succeeded dialog

Please note that ClickOnce doesn’t provide any opportunity to customize or hide dialogs and messages shown while the user is installing or updating your add-in.

Step 15. Register/unregister or uninstall the Office extension

To unregister or re-register your Office extension, the user browses for the deployment manifest (<projectname>.application) in Internet Explorer or Windows Explorer and runs it. This opens the dialog below, where the user can click either Unregister or Register.

ClickOnce setup dialog

You can add a ClickOnce module to your project to show a custom dialog instead of the above dialog.

To uninstall your product, the user uses the standard features of operating system, Control Panel -> Add or Remove programs (Programs and Features since Vista).

Maintenance dialog

Step 16. Installing a new version of the Office extension

Please see Redeploying per-user Office extensions via ClickOnce.


Post a comment

Have any questions? Ask us right now!