DCSIMG
Deployment .NET apps using ClickOnce - Maor's Blog

Deployment .NET apps using ClickOnce

In my opinion, the most important part in software is deployment. What is the best way how to get the application into your users' hands?

there are a lot of ways to do it, I'll introduce here ClickOnce technology.

ClickOnce is a deployment technology that allows you to create self-updating Windows-based applications that can be installed and run with minimal user interaction.

Read more about ClickOnce here.

ClickOnce enables the user to install and run an application by just clicking a link in a web page. The core principles of ClickOnce are to bring the ease of web applications to the Windows user. ClickOnce aims to solve other problems with conventional deployment models, and the most important is the difficulty in updating a deployed application.

How it works?

  • You create a Windows forms application and use the Publish option to deploy the application onto any of the following locations: File System, Local Web Server, FTP Site, or a Remote Web Site.
  • Once the application is deployed onto the target location, the users of the application can browse to the publish.htm file and install the application onto their machine. Note that publish.htm file is the entry point for installing the application and this will be discussed in the later part of this article.
  • Once the user has installed the application, a shortcut icon will be added to the desktop and the application will also be listed in the Control Panel/Add Remove Programs.
  • When the user launches the application again, the manifest will contain all the information to decide if the application should go to the source location and check for updates to the original application. Let us say, for instance, a newer version of the application is available, it will be automatically downloaded and made available to the user. Note that when the new version is downloaded, it is performed in a transacted manner meaning that either the entire update is downloaded or nothing is downloaded. This will ensure that the application integrity is preserved.

I created simple application, and the next step is to create a ClickOnce deployment.

In Visual Studio, from the top menu, go to Build | Publish YourProjectName. The Publish Wizard will appear:

Step 1 - Specifying Publish Location

co1

Depending on what location you input here, the choices you see in subsequent screens of this wizard will vary. I will be publishing to a web site.

Step 2 - Online or Offline?

The next screen will ask you whether you want your application to run both offline/online or just online;

co2

Select the "Yes, this application is available online or offline". This is the option that automatically sets up the Start Menu folder/icon as well as the Uninstall option. Press Next to proceed to the next screen.

Step 3 - Summary

Click the Finish Button to publish your application. After you have published your application, your browser will automatically load with the URL of the install page.

That's all there is to publishing a .NET application to the web!

There are many cool features in ClickOnce that I have not covered yet. To access the advanced properties, go to Project and select "ProjectName Properties..." The properties tab will appear. You can change the publish edit there the application pre-requisities (like .NET framework), updates mode (automatically or not) and more.

co3

Do you want to install my sample project? ClickOnce!

 

del.icio.us Tags:

Technorati Tags:

Published 04 September 2007 11:36 PM by Maor David-Pur
תגים:,

Comments

# maor.Blogging(); » Blog Archive » Deploy .NET Apps with ClickOnce said on 05 December, 2009 04:05 PM

Pingback from  maor.Blogging();  » Blog Archive   » Deploy .NET Apps with ClickOnce

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above:

Search

Go

This Blog

News

    RSS

     

    Connect with Me

    Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
           

Syndication