Print | Contents | Close |

Configuring and Deploying a ClickOnce Application

Learning objective

After completing this topic, you should be able to access the configuration options of a ClickOnce application, and publish and install an application using ClickOnce.

Exercise overview

In this exercise, you're required to access the configuration options of a ClickOnce application, and publish and install an application using ClickOnce.

This involves the following tasks:

Task 1: Accessing configuration options

Suppose you want to configure the ClickOnce properties for an application named ClickOnceAPIs.

Set the ClickOnceAPIs application to be available online only once it's published, and calculate the permissions required by the application.

Steps list
Instructions
1. Select View - Solution Explorer
2. Select the application and click the Properties icon
3. Click the Publish node
4. Select the The application is available online only radio button
5. Click the Security node
6. Select Enable ClickOnce Security Settings, select This is a partial trust application, and click the Calculate Permissions button

Task 2: Publishing an application

Now that you've configured ClickOnce properties, you want to publish the application.

Publish the application named ClickOnceAPIs so that it is available online and offline. Accept the default publishing location.

Steps list
Instructions
1. Select Build - Publish ClickOnceAPIs
2. Click Next
3. Accept the selection of the Yes, this application is available online or offline radio button and click Next
4. Click the Finish button

Task 3: Installing an application

As a user, you want to install the published application named ClickOnceAPIs on your computer so that you can use it offline.

Install the application named ClickOnceAPIs from the web site to which it was published. Assume that you've already navigated to the web site.

Steps list
Instructions
1. Click the Install button
2. Click Install a second time

A ClickOnce application has now been configured, published, and installed for online and offline use.