This is a deployment technique that allows for a self-updating Windows based application that can be installed and then run with minimal user interaction
This method of deployment supports offline, automatic updating and rollback
Unlike the Setup / Windows Installer technique nothing is added to the Program Files directory, the registry or to the desktop
Deploying using ClickOnce only supports creating keys under HKEY_CURRENT_USER
link -

ClickOnce Facts

ClickOnce does not support writing keys to the registry.
Cannot be used to install and add-in in HKEY_LOCAL_MACHINE
ClickOnce is not capable of deploying additional components such as registry keys.
ClickOnce does not support having the same add-in installed from 2 different locations.
ClickOnce supports digital signing security features.
ClickOnce security relies on a code-signing certificate. You can use the certificate generated by Visual Studio which will give the user a pop-up asking if they trust the source
ClickOnce deployment will grant full trust to Office solutions automatically ??

In Visual Studio 2008 a user can press the Cancel button which disables the add-in
This was fixed in Visual Studio 2008 SP1 so pressing cancel just leaves the old version working

You can make a Visual Studio 2008 add-in for Office 2003 available to all users by creating the registry entries under HKLM instead of HKCU.

How to Deploy VSTO solutions ?

There are several ways of installing your VSTO solutions
1) Run the setup.exe

2) Opening the vsto deployment manifest
(assuming that the VSTO runtime is already installed)

3) Opening the customised workbook or document (document-level only)
(assuming all pre-requisites are already installed and security policy has been set)

4) Opening the host application (application-level only)

Loading a new Version Sequence

Loading the correct version involves several steps
1) The VSTO runtime reads the application manifest embedded in the solution and gets the location of the deployment manifest
2) The VSTO runtime compares the version of the application manifest with the version in the deployment manifest
3) If the versions do not match then the corresponding application manifest is downloaded. This replaces the existing application manifest in the document.
4) The VSTO then reads the location of the assembly and loads it.

Project Properties, Signing Tab

The test certificate is configured to automatically sign the deployment manifest every time you publish

SIgn the ClickOnce Manifest -
Select from store - Allows you to change the certificate if you want to use a different one
Create test certificate - The test certificate that is created for you automatically expires one year after it has been created. If the test certificate has expired the project will not build.
More Details - Displays the "certifcate" dialog box to show you additional information
Timestamp server URL -
Sign the assembly -
Choose a strong name key file -
Change password -
Delay sign only -

Deployment Strategies

There are three different strategies you can choose from
1) Install from a website or network share
2) Installl from a cd
3) Start the application from a website or network share

Strategy 1
Application is deployed to a web server or network share
To install click on an icon on the web page
Application is downloaded, installed and started
Application appears in the Add/Remove Programs dialog box
In the Publish Wizard, click From the Web
This is the default deployment strategy

Strategy 2
Application is saved on a cd
To install click on the file
Application is installed and started
Application appears in the Add/Remove Programs dialog box
In the Publish Wizard, click From a CD-Rom

Strategy 3
To install click on an icon on the web page
Application is started
When the application is closed the application disappears and is no longer available
Nothing is added the Add/Remove Programs dialog box
The application is actually downloaded and installed into the ClickOnce Cache
In the Publish Wizard, click Do not install the Application on the "Install or Run from Web page"

Allows you to publish, update and cache the code locally.

Supports publishing to:

  • local drives

  • UNC paths

  • http sites

  • removable media (cds, dvds, usb drives)

All ClickOnce deployments must be signed with a digital certificate
By default ClickOnce applications are automatically signed with a Self-Cert and are excluded from Trusted Application Deployment.
When you sign a ClickOnce deployment using a certificate, ClickOnce records the date and time of the signing and embeds it into the deployment's digital signature.
As long as the deployment was signed when the certificate was valid, ClickOnce will allow the application to run even if the certificate has since expired.

The IE settings to affect how ClickOnce works if the installer is on a website because the .NET framework uses IE settings to determine if that particular website can be trusted.
Installation folder URL - customers want to deploy the solution locally on their servers.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext