Compartilhar via


Choosing a ClickOnce Deployment Strategy

There are three different strategies for deploying a ClickOnce application; the strategy that you choose depends primarily on the type of application that you are deploying. The three deployment strategies are:

  • Install from the Web or a Network Share

  • Install from a CD

  • Start the application from the Web or a Network Share

    NoteNote

    In addition to choosing a deployment strategy, you will also want to choose a strategy for providing application updates. For more information, see Choosing a ClickOnce Update Strategy.

Install from the Web or a Network Share

Using this strategy, your application is deployed to a Web server or a network file share. When an end user wants to install the application, he or she clicks an icon on a Web page or double-clicks an icon on the file share. The application is then downloaded, installed, and started on the end user's computer. Items are added to the Start menu and the Add/Remove Programs group in the Control Panel.

Because this strategy depends on network connectivity, it works best for applications that will be deployed to users who have access to a local-area network or a high-speed Internet connection.

If you deploy the application from the Web, you can pass arguments into the application when it is activated using a URL. For more information, see How to: Retrieve Query String Information in a ClickOnce Application. You cannot pass arguments into an application that is activated using any of the other methods described in this document.

To enable this deployment strategy in Visual Studio, click From the Web or From a UNC path or file share on the How Installed page of the Publish Wizard.

This is the default deployment strategy.

Install from a CD

Using this strategy, your application is deployed to removable media such as a CD-ROM or DVD. As with the previous option, when the user chooses to install the application, it is installed and started, and items are added to the Start menu and the Add/Remove Programs group in the Control Panel.

This strategy works best for applications that will be deployed to users without persistent network connectivity or with low-bandwidth connections. Because the application is installed from removable media, no network connection is necessary for installation; however, network connectivity is still required for application updates.

To enable this deployment strategy in Visual Studio, click From a CD-ROM or DVD-ROM on the How Installed page of the Publish Wizard.

To enable this deployment strategy manually, edit the deploymentProvider tag in the deployment manifest. (In Visual Studio, this property is exposed as Installation URL on the Publish page of the Project Designer. In Mage.exe it is Start Location.)

Start the Application from the Web or a Network Share

This strategy is similar to the first, except the application behaves like a Web application. When the user clicks a link on a Web page (or double-clicks an icon on the file share), the application is started. When users close the application, it is no longer available on their local computer; nothing is added to the Start menu or the Add/Remove Programs group in the Control Panel.

NoteNote

Technically, the application is downloaded and installed to an application cache on the local computer, just as a Web application is downloaded to the Web cache. As with the Web cache, the files are eventually scavenged from the application cache. The perception of the user, however, is that the application is being run from the Web or file share

This strategy works best for applications that are used infrequently—for example, an employee-benefits tool that is typically run only once a year.

To enable this deployment strategy in Visual Studio, click Do not install the application on the Install or Run From Web page of the Publish Wizard.

To enable this deployment strategy, manually, edit the install tag in the deployment manifest (its value can be true or false). (In Mage.exe, use the Online Only option in the Application Type drop-down list.)

See Also

Tasks

How to: Publish a ClickOnce Application

Concepts

Choosing a ClickOnce Update Strategy
ClickOnce Deployment and Security
Choosing a Deployment Strategy

Other Resources

ClickOnce Deployment