1. Home
  2. Computing & Technology
  3. Visual Basic

Deployment options for Visual Studio .NET 2.0 overview

ClickOnce Project Publishing

By Dan Mabbutt, About.com

Setup Project Icon in Visual Studio 2005

Setup Project Icon in Visual Studio 2005

ClickOnce is completely new in Visual Studio 2005 and is yet one more demonstration of how seriously Microsoft is moving into a network based software strategy. It's called "publishing" rather than "deployment" partly to reflect the fact that ClickOnce assumes that you want your project to be available from a network server.

In Visual Basic 2003, you had the capability to deploy a Windows Forms app using HTTP. This was called "hrefing an EXE" and you did it by using an "HREF" tag to point to a .NET EXE file. Something like this:

<a href="AboutVBProj.exe">Run this cool VB app using HTTP!</a>

If your customer was using Internet Explorer and the .NET Framework, the .NET runtime could download and run the executable and any DLLs it might require.

Microsoft stepped up the ladder a lot with ClickOnce in Visual Studio 2005, however.

ClickOnce is both one of the easiest ways to put your work in front of your customers and one of the most powerful. Not only does it deploy your project to a "web site, FTP server, or file path" but it also provides an automated way to download updates to the project whenever the solution changes (think: "Windows Update"), creates shortcuts on the customer's machine, and creates add/remove capability through Windows. The automatic ClickOnce updates are "transacted". That means they are either done fully or not at all.

It's designed to provide the slickest, quickest user experience possible. The concept of "click just once" is from your customer's point of view.

What ClickOnce is not is flexible. If you want flexible, go back to Setup projects. ClickOnce gets it's remarkable simplicity by handling all the messy details internally and you don't have many options to override them. You can decide if you want the project to be online only or both online and offline, you can change the name, and you can change where the project is deployed. That's pretty close to "it".

You won't see ClickOnce anywhere in the VS 2005 menu. To create a ClickOnce deployment, select Publish appname from the Build menu. VS 2005 takes you through a relatively short wizard and creates a bunch of files that do all the work. You don't have to know anything about these files, you can't change them anyway.

Unfortunately, a small but growing number of experts are starting to throw rocks at ClickOnce. One of the most serious complaints is that it is either so inflexible as to be virtually useless, or else it opens up unacceptable security holes in your system. You can get a flavor of that argument from guru Rick Strahl's article here: One Click Deployment - not quite....

But ... don't take anyone's word for it. It's easy to create a very simple Windows App and then create a ClickOnce deployment. You ought to do it right now.

Explore Visual Basic

More from About.com

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Using VB.NET
  5. Deployment Options for Visual Studio .NET 2.0 Overview

©2008 About.com, a part of The New York Times Company.

All rights reserved.