|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Choosing a Deployment Strategy
Visual Studio provides two different strategies for deploying Windows-based applications: publishing an application using ClickOnce technology, or deploying it with a traditional Setup using Windows Installer technology. With ClickOnce deployment, you publish the application to a centralized location and the user installs or runs the application from that location. With Windows Installer deployment, you package the application in a setup.exe file and distribute that file to users, who run the Setup.exe file to install the application.
There are several factors to consider when choosing a deployment strategy: the type of application, the type and location of users, the frequency of application updates, and the installation requirements.
In most cases, ClickOnce deployment provides a better installation experience for the end user and requires less effort on the part of the developer. There are, however, some cases where Windows Installer deployment is necessary.
The deployment tools in Visual Studio are designed to handle typical enterprise deployment needs; they do not cover every possible deployment scenario. For more advanced deployment scenarios, you may need to consider using a third-party deployment tool or a software distribution tool such as Systems Management Server (SMS).
Features of ClickOnce Deployment
In general, ClickOnce deployment greatly simplifies the process of installing and updating an application, but you do not get the power of Windows Installer deployment, which provides you with greater flexibility.
ClickOnce deployed applications are self-updating and are the best choice for applications that require frequent changes. Although ClickOnce applications can be initially installed by means of a CD-ROM, users must have network connectivity to take advantage of the update capabilities.
Finally, there may be security considerations that could affect your choice of strategy. In some cases, ClickOnce deployment may require the user to make a security decision that might not be appropriate for less sophisticated users. For more information, see.
Features of Windows Installer Deployment
With Windows Installer, you add a Setup project to your solution to create a setup file that is distributed to users; the user runs the setup file and steps through a wizard to install the application. With ClickOnce, you use the Publish Wizard to package your application and publish it to a Web site or network file share; the user installs and launches the application directly from that location in a single step.
With Windows Installer, you create an installer package that is distributed to users; the user runs the setup file and steps through a wizard to install the application. With ClickOnce, you create application and deployment manifests and publish them along with the application files to a Web site or network file share; the user installs and launches the application directly from that location in a single step.
For a summary table comparing the ClickOnce and Windows Installer technologies, see the ClickOnce and Windows Installer Comparison Table in.