49.2. ClickOnce

Using a Windows installer is a sensible approach for any application development. However, deploying an installer to thousands of machines, and then potentially having to update them, is a daunting task. Although management products help reduce the burden associated with application deployment, web applications often replace rich Windows applications because they can be dynamically updated, affecting all users of the system. ClickOnce, introduced in version 2.0 of the .NET Framework, enables you to build self-updating Windows applications. This section shows you how to use Visual Studio 2008 to build applications that can be deployed and updated using ClickOnce.

49.2.1. Click to Deploy

To demonstrate the functionality of ClickOnce deployment, this section uses the same application we used to build the Windows Installer, Simple Application, which simply displays an empty form. To deploy this application using ClickOnce, open the Publish tab of the project properties designer. Publishing the application deploys the current version of the application to the location defined in the Publishing Folder Location path (in the case of Figure 49-17, http://localhost/DeploymentSample/) along with a deployment manifest that details the application components and security. Although the publish location appears as a drop-down list, it is only populated with previous locations to which you have published the application, so initially it will be empty. Clicking the ellipsis button ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.