RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


ClickOnce: Delivering .NET Applications Via the Net

With ClickOnce, Microsoft delivers a client-side application deployment and updating solution that offers a glimpse into the future, where centrally-located and managed applications delivered via the Web don't have to run in interface-challenged browsers.

rom the simplest point of view, ClickOnce is a software technology from Microsoft that gives .NET developers the ability to publish complete applications (executable programs along with their resource and data files) to a Web server. ClickOnce creates "deployment packages" accessible to end users (clients) via a URL. A client request for that URL triggers an install process that deploys the application to the client's machine.

In our quest to succinctly explore the riches of ClickOnce, we're going to trip over a lot of the "exposed wires and cables" of this matrix. ClickOnce is a boundary-crossing technology—a new paradigm if you will—but I see it as more than just a deployment and update solution; it's an important evolutionary step on the path to the inevitable ultimate fusion of what are now the "parallel universes" of Web (browser-based) development and "classic" desktop application development.

ClickOnce allows developers to build centralized applications that provide a per-user solution. Like Web applications, end users can download, install, and use these products without being logged in as administrators. They can obtain and use your products on-demand, because the applications are available online at any time.

ClickOnce didn't arise from a vacuum; it evolved from earlier technologies. Brian Noyes, a software architect with iDesign, and author of a new book on ClickOnce says, "Some of the historical build up [for ClickOnce] was no-touch deployment in .NET 1.0...followed by the AppUpdater component from Jamie Cool as a proof of concept, followed by the Updater Application Block as an interim solution."

In other words, ClickOnce emerged from a matrix of .NET—and earlier—technologies and concepts for publishing, deploying, and updating applications securely via the Net. Among its ancestors are:

  • Internet or server-based deployment, installation, and updating technologies for applications, including the concept and implementation of "No Touch Deployment" and other models. Java Web Start is a non-Microsoft example of innovation in this area.
  • Microsoft's run-inside-the-browser solutions, first and foremost the security horror of embedded ActiveX controls.
  • The split between thick and thin clients, both conceptually and as actual real-world solutions.
  • "Rich" and/or smart clients, most recently those enabled by the Windows Presentation Foundation. It's important to remember that smart clients are not restricted to WPF, they can also be Windows Forms, VSTO applications, smart device mobile applications, etc.
  • Various .NET 1.0~2.0 technologies intended to simplify updating applications, such as Microsoft's Application Updater Block.
ClickOnce is also more than just an "escape route" from the DLL hell often created by earlier deployment efforts; it's an attempt to make the Internet, an intranet, a network share, or a CD an easy-to-use installation and update source for .NET applications. ClickOnce is built into Visual Studio 2005, is secure, flexible, lightweight (compared to the earlier Microsoft Installer (MSI), etc. deployment technologies), and is capable of interacting with other Microsoft tools. It has a broad reach, too; you can publish Windows Presentation Foundation (.NET 3.0), Windows Forms, or console applications with it.

ClickOnce gives developers a unified metaphor for solving deployment and update problems—not just for the application binaries themselves, but also for all the complex services, controls, data files, static resource files, etc. associated with the application.

All in all, ClickOnce is another attempt to attain one of the "Holy Grails" of software development—providing a centrally-based solution from which developers can deliver applications with all their resources and data files securely to end users and provide a way to keep those applications current.

To accomplish all that, ClickOnce consists of a complex package of technologies containing many features, options, and possible synergies with other Microsoft software tools. This first article has just time and space to cover the basics and one very simple example. However, you should be aware that far more advanced uses of ClickOnce are possible that match the most sophisticated features of the current generation of dedicated installation and update utilities. You'll have to weigh the investment and mastery of your current tools against the up-front costs of the learning curve for advanced ClickOnce features. And you should be aware that ClickOnce may require you to use other Microsoft tools, such as BootStrapper and Mage.

If you're already familiar with the process of building MSI files, this MSDN article, "Choosing Between ClickOnce and Windows Installer" provides a useful comparison of ClickOnce with MSI.

Although much of the information about ClickOnce (starting with the name) would lead you to believe that ClickOnce is a completely wizard-driven solution, ClickOnce also has its own advanced API, which you can use to script and customize the install process. If you use it though, be aware that any application code that uses the APIs must have full trust privileges on the clients' machines/sites. While the ClickOnce runtime itself has full trust privileges, the same may not be true of your application's install code.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date