ClickOnce Releases


What is ClickOnce?

ClickOnce is a .NET deployment technology that enables a user to install and run a Windows application by simply clicking a link from a web page. ClickOnce applications are also inherently self-updating, as they check for newer versions as they become available. ClickOnce applications are also “low-impact”, in other words, they do not need administrative rights to install, only install for the current user, and are isolated from other ClickOnce applications.

Since there is no direct way of publishing your ClickOnce application to CodePlex from within Visual Studio, we have attempted to make the process as simple as possible. The next few sections will walk you through the preparation and publishing, and ultimately creating a ClickOnce release on CodePlex.

Publishing a ClickOnce Application

This first step assumes that you have an existing .NET Windows application (Console/Windows Forms/ WPF) that you wish to publish using ClickOnce. When you open the Publish dialog (Build -> Publish) from Visual Studio, the first step will ask for a location to place the published ClickOnce application files. Feel free to change this value to an easy-to-remember path on your computer.

step1.png

The next step asks where users will be installing this application from. Select “From a Web Site” and type the following in the textbox, replacing “ProjectName” with your project name.
http://ProjectName.codeplex.com/releases/clickonce
This is a very important step, and the CodePlex software ensures that your ClickOnce application has a valid URL that matches your project.

step2.png

At this point, you can either click “Next” to walk through a few other steps or you can click on “Finish” to complete the publish operation.

Preparing the ClickOnce Application

If you open up the location where your application is published, you’ll see a folder structure similar to the following:

step3.png

As you can see, there isn’t just a single executable that can be uploaded. Each version of your ClickOnce application has a folder with the necessary files in it that is contained in the “Application Files” folder. To prepare the ClickOnce Application for CodePlex, zip the entire directory, making sure the *.application file is at the root of the zip file.
Note: This is a mandatory zip file structure that is required. Validation of your ClickOnce application will fail if this is not followed.

Creating a ClickOnce Release

When you create a new release for your project, you’ll notice a new checkbox underneath the release name. When that is checked, a file upload control is displayed. Select the zip file you created in the last step and fill out the rest of the create release form.

step4.png

A few notes about ClickOnce releases:
  1. The ClickOnce application becomes your “default file”. There is no way of making another file for that release the default.
  2. ClickOnce releases are always public. There is no way of “hiding” them.
  3. You can only have 1 active ClickOnce release at a time. All older ClickOnce releases will be “archived”, which means they are still accessible you just cannot make them recommended releases, or update the release’s ClickOnce application.
When the ClickOnce release has been created, you’ll be redirected to view the release.

step5.png

If you click on the “ClickOnce Installer” link, it will start the download and ClickOnce installer.
Note: The ClickOnce installer will launch only for Internet Explorer and FireFox (should you have the plugin installed). If you are prompted to download the application file, save this file locally and execute it to launch the ClickOnce installer.
Clicking on “Install” will install and launch the application.

step6.png

Updating a ClickOnce Release

When you have a new version of your project to release, you should follow the same steps for publishing and preparing your ClickOnce application.
Note: Visual Studio should retain the URL that you previously specified during publishing.
When you are ready to upload the ClickOnce zip file, you have the choice of updating the current ClickOnce release or creating an entirely new ClickOnce release. The latter of the two will archive your current ClickOnce release automatically. Both choices will prompt your users to update the currently installed application on the next launch.

step7.png

Last edited Jul 13, 2010 at 1:43 PM by matthaw, version 3

Comments

egk696 May 11 at 11:27 PM 
I get a Sorry, this ClickOnce zip file is not properly formatted. I tried zipping the publish folder like publish.zip and I also tried zipping each individual Application File. Dont know what wrong about the formatting.

radioman Jan 20 at 8:34 PM 
works fine today ;}

JohanDanforth Oct 29, 2012 at 10:12 AM 
Please, please add support for VSTO files

ReBoot Jul 17, 2012 at 8:01 AM 
@ Radioman: check for http/https at the beginning of the URL. I had the same problem today and that was the cause.

Riltas Jun 3, 2012 at 11:12 AM 
If I make an update for my program, should I zip older releases from "Application Files" folder too?

joe213 May 26, 2012 at 7:19 AM 
I also got a invalid zip file, solution was: be shure, that the application file is in the root of the zip file (zip the publish-files not the folder).

Second, ensure HTTPS and not HTTP as described here:
https://ProjectName.codeplex.com/releases/clickonce

rhornjr Mar 3, 2012 at 9:45 PM 
What about the app.config file? Is that rendered useless by ClickOnce, or can it be altered by users?

Birbilis Jan 16, 2012 at 8:11 PM 
Ooops, should update the document I think since a common error seems to be that people enter the URL at the 1st page of the wizard instead of using a local folder like "Publish" (relative to the project solution that is). This tries to publish directly to CodePlex server which fails (some docs on the net say the reason for the message you see [regarding FrontPage Extensions not being insalled on the server] is that you need to run Visual Studio with admin permissions, but in this specific case, you're just not supposed to publish directly to CodePlex URL)

Birbilis Oct 3, 2011 at 4:14 PM 
I'm getting: "Failed to connect to 'http://LvS.codeplex.com/releases/clickonce/' with the following error: Unable to create the Web site 'http://lvs.codeplex.com/releases/clickonce'. The Web server does not appear to have FrontPage Server Extensions installed."

happyrabo Jul 6, 2011 at 4:40 PM 
Are the actual rules for ClickOnce zip file validation documented anywhere? F# projects don't have built-in support for ClickOnce deployment, so I'm trying to make a valid ClickOnce zip file by hand, and I have no way of knowing why I'm being rejected.

MrHinsh Apr 13, 2011 at 11:22 PM 
How does this work if you have multiple click once applications as part of your project?

gwjasu Feb 14, 2011 at 6:35 AM 
let us do it . i think it's ok.

dobrakmato Jan 8, 2011 at 8:01 PM 
i have multi-project solution how i can use ClickOnce whithout publishing and installing each project individually?

virusxd Nov 5, 2010 at 11:55 AM 
How browse the ClickOne files?

MrHinsh Oct 20, 2010 at 10:10 PM 
Can you use multiple applcaitons on a single project and still use this?

Is there some way to specify a indevidual release?

MrWeiland Oct 6, 2010 at 12:18 PM 
>mscherotter
As "mscherotter" said....please enable to use VSTO ClickOnce applications....

sylvanascent Aug 18, 2010 at 9:21 AM 
See http://codeplex.codeplex.com/Thread/View.aspx?ThreadId=222665 for more info and the fix. Basically, set the Update location to be the same as the installation URL.

sylvanascent Aug 18, 2010 at 8:59 AM 
Yep, I couldn't get it to work either. Using VS2008 Pro. Get the same invalid ClickOnce zip file.

begtostudy Aug 11, 2010 at 6:37 AM 
Invalid ClickOnce zip file. Please specify a valid Installation Folder URL (http://neut.codeplex.com/releases/clickonce/).
The installer is no problem in local machine, and build follow the tutorial.

begtostudy Aug 5, 2010 at 8:07 AM 
How to cope with Application Run???

mscherotter Jul 21, 2010 at 11:33 PM 
VSTO Click-once applications create a file with a .vsto extension, not an .application extension. Can this please be made to work with VSTO Click-once applications as well?

Etheral Jul 19, 2010 at 6:52 AM 
There is an error:
Error 1 Failed to connect to 'http://studytools.codeplex.com/releases/clickonce/' with the following error: Unable to create the Web site 'http://studytools.codeplex.com/releases/clickonce'. The components for communicating with FrontPage Server Extensions are not installed.

radioman Jul 14, 2010 at 11:20 AM 
hot news: when publishing -> Error 2 Failed to connect to 'http://greatmaps.codeplex.com/releases/clickonce/' with the following error: Unable to create the Web site 'http://greatmaps.codeplex.com/releases/clickonce'. The Web server does not appear to have FrontPage Server Extensions installed. 1 1 GMap.NET - Hot Build

radioman Jul 14, 2010 at 11:10 AM 
works perfect today ;} whew, thats really something! Thanks

radioman Jul 13, 2010 at 6:56 PM 
i get Invalid ClickOnce zip file., i tested it localy, works perfect, what can be problem?