Export (0) Print
Expand All

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.

    Ff699224.1a6e0491-5e67-4505-a6ca-ad3d3285cd79(en-us,PandP.10).png

    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.

    Ff699224.6c85ffa6-69ba-4eda-a57f-0c5d0a391160(en-us,PandP.10).png

    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.

    Ff699224.ff180de6-9377-4d22-ac3f-19e9af408781(en-us,PandP.10).png

    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).

    Ff699224.a3c369c0-90db-43f3-9418-2addca9f761b(en-us,PandP.10).png

    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).

    Ff699224.81b730e9-20df-4b03-a415-34bb1f56120e(en-us,PandP.10).png

    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).

    Ff699224.86e75c88-a8b0-4caf-a64f-771898da0203(en-us,PandP.10).png

    Figure 6

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

    Ff699224.927a6132-2c80-48ba-8c69-652ca8e79be9(en-us,PandP.10).png

    Figure 7

    Enabling security settings
  9. Click the Publish tab. When you are ready to publish the application, you will use this tab.
    Ff699224.note(en-us,PandP.10).gifNote:
    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.

    Ff699224.5f0d05a2-f1f3-4949-a882-f304118e7905(en-us,PandP.10).png

    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).

    Ff699224.b8c41546-d655-4037-a92d-a2cf085e356c(en-us,PandP.10).png

    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.

    Ff699224.a4fb9232-f48f-45e1-9bf3-e2201f402645(en-us,PandP.10).png

    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.
    Ff699224.note(en-us,PandP.10).gifNote:
    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.

    Ff699224.f255e1de-baf4-4b24-90a0-ba9649ba4ed7(en-us,PandP.10).png

    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.

    Ff699224.b353555f-58a3-4223-8545-73ff89b4a64e(en-us,PandP.10).png

    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.


Show:
© 2014 Microsoft