Introducing ClickOnce Deployments

ClickOnce was created to try to match the low-deployment factor of web applications. With web applications, users can merely open a browser and click a link to access functionality. In a similar fashion, with ClickOnce, you can publish a set of binaries to a web server or file share, and users can simply click a link to the ClickOnce package to have the application installed onto their machine. The ClickOnce technology is available for Windows Presentation Foundation applications, Windows Forms applications, and .NET console applications.

You can use three methods to deploy any of these flavors of applications using ClickOnce:

Image Web/Share deployment—In this model, your application executables or DLLs are first published to a web server or network share. You can then provide a link (either a web URL or network path) to binaries. Users can click this link to have the applications automatically installed onto their current machine (thus the moniker ClickOnce). No further interaction is required from the user.

Image CD deployment—With this method, binaries are packaged and copied onto a CD or DVD. Users then browse the content of the media and launch the install process with one click. This method is primarily used when users are isolated and do not have the required Internet access or network access to make the web/share deployment method useful.

Image Web/share execution—This scenario is nearly identical to the first method discussed. Binaries are published to a web location or network share, and a link to that location is then provided to users. When the user clicks that link, the binaries are immediately copied over and the application starts without making a permanent home for the app on the user’s PC. After a user closes the application, it is like it was never there in the first place; all the application binaries are removed, there are no entries placed within the Start menu or within the Add or Remove Programs list in the Control Panel, and so on. To the user, it appears as if the application has been run directly from the Internet (or network share), although in fact the binaries have been cached on to the local machine.

ClickOnce applications are extremely easy to deploy for developers, and they are extremely easy for users to install because little interaction is required and there is little overall footprint on the client. However, this simplicity comes with a price. Generally speaking, ClickOnce deployments cannot do any of the more complicated things we referenced in the introduction to this chapter, such as modifying Registry settings or installing third-party software. If your install scenario is too complicated for ClickOnce to handle, you have to turn to Windows Installer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset