Share via

How to: Set the Basic ClickOnce Publishing Properties

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
To create client business applications using current Microsoft technologies, see patterns & practices' Prism.

There are some settings that you need to apply before you publish your application for the first time. For most of these, you only need to set them once.

To set the basic ClickOnce publishing properties

  1. In Visual Studio, open the Smart Client RI solution and locate the Shell project in Solution Explorer as illustrated in Figure 1.


    Figure 1

    Shell project in Solution Explorer

  2. Double-click Properties. The property pages will be displayed on the left side of the screen.

  3. Click the Signing tab and select the Sign the ClickOnce manifests check box (see Figure 2). Signing the manifests ensures that no one can tamper with your deployment and download it to another computer in place of yours.


    Figure 2

    Specifying that the manifests should be signed

  4. If you do not have a specific signing certificate to use, click Create Test Certificate, and enter a password for your .pfx file (see Figure 3.) Visual Studio will create a certificate for you, and add the certificate file (Shell_TemporaryKey.pfx) to your project.


    Figure 3

    Creating a test certificate in Visual Studio

  5. If you created your own test certificate as described in How to: Create Your Own Test Certificate, you can click Select from File, and browse for the .pfx file that you created as shown in Figure 4. This is also how you would select your .pfx file if you purchased a certificate from a certificate authority (CA).


    Figure 4

    Selecting a .pfx file for signing the deployment

  6. Select the file and click Open. You will be prompted for the password (see Figure 5).


    Figure 5

    Entering a password for the certificate file

  7. Enter the password, and then click OK. Information about your certificate will appear in the middle of the screen (see Figure 6).


    Figure 6

    Information about the certificate

  8. Click the Security tab and then select the Enable ClickOnce security settings check box (see Figure 7).


    Figure 7

    Enabling security settings

  9. Click the Publish tab. When you are ready to publish the application, you will use this tab.


    Note: When you deploy a Composite UI Application Block application, you will have to modify the deployment after you publish it so that you can add the modules that should be included. For this reason, you stage the deployment on a folder on your computer, make changes to it, and when the entire package is ready, copy it to the Web server.

  10. In the Publishing Folder Location text box, enter the path to a local folder. You should create a folder just for this purpose. The examples in this document use C:\_Publish\SCSF. You can click the ellipses button (…) to browse to the folder location.

  11. In the Installation Folder URL text box, enter the URL that you will provide when you deploy the application. The examples use the IIS server on your local computer to deploy the application to the user; therefore, in the examples, the URL will be a folder under localhost. You should now see a window that resembles Figure 8.


    Figure 8

    Setting the deployment location and URL

  12. Click the Prerequisites button. The Prerequisites dialog box will appear (see Figure 9). You should have all of the prerequisites installed on your computer. When you actually deploy your application to a customer, you will have to select the appropriate version of the .NET Framework and Windows Installer 3.1, plus any other prerequisites you need (such as SQL Server® 2008 Express Edition). The prerequisites are installed the first time the user runs the application Setup program (Setup.exe).


    Figure 9

    Prerequisites dialog box

  13. Click OK to return to the Publish window.

  14. Click Updates. The ApplicationUpdates dialog box will appear (see Figure 10). Select the The application should check for updates check box, and then click Before the application starts. This will enable automatic updates.


    Figure 10

    Application Updates dialog box

  15. If you want to force the user to install an update, select the Specify a minimum required version for this application check box, and enter the version number that you are deploying.


    Note: The version number does not change automatically if you change the version number on the Publish window. You have to change the number in this dialog box whenever you deploy a new version and want to keep the user from refusing the update.

  16. Click OK to return to the Publish window.

  17. Click Options. The Publish Options dialog box will appear (see Figure 11).

  18. Click the Description tab, and then complete the following:

    1. Select a language from the Publish language drop-down list.
    2. In the Publisher name text box, type the name of the folder that will be listed on the Windows Start menu. In the Suite name text box, type the name of the subfolder that will appear under the Publisher name (optional), and in the Product name text box, type the name of the application shortcut. You can also specify a Support URL and an Error URL that users can go to if they experience installation problems. At a minimum, you must complete the Publisher name and Product name.


    Figure 11

    The Description tab of the Publish Options dialog box

  19. Click the Manifests tab (see Figure 12), and then select the Create desktop shortcut check box. When the user installs the application, it will create a desktop shortcut in addition to the shortcut on the Start menu.


    Figure 12

    Manifests tab of the Publish Options dialog box

  20. Click OK to return to the Publish window.

    Your basic options are now set up, and you are ready to publish an initial version of the application.