Академический Документы
Профессиональный Документы
Культура Документы
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
home
articles
quick answers
discussions
Sign in
features
community
help
Next
Article
Browse Code
About Article
Bugs / Suggestions
Stats
Rate this:
Article
Licence
CPOL
Revisions (2)
Alternatives
Introduction
First Posted
27 Jul 2009
Views
67,968
Bookmarked
73 times
Comments (26)
Share
Deployment of Windows Application has always been a not-so-easy task. We had to create Deployment Project, ship
it via some media and then it had to be installed to make the application available to use. Moreover, maintaining or
managing updates and patches were even more challenging. ClickOnce technology introduced with .NET Framework
2.0 takes care of all the challenges of conventional Windows Application Deployment Issues. Let us get into the core
of it.
C# Windows .NET
Visual-Studio , +
How It Works
Let us start with a Simple WinForm Application. I have created a Windows Forms Application in C# named
ClickOnceDeploymentDemo with one form with a button and added a simple code to display the assembly path
with the button click event. Refer to the following screen shots:
Top News
Microsoft makes source
code for MS-DOS and
Word for Windows
available to public
Get the Insider News free each
morning.
Related Videos
1 of 7
2/4/2014 12:07 PM
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
Related Articles
Click Once Deployment
Configuration
How to Take Backup from SQL
Azure using Database
Deployment Technique
ClickOnce - Quick steps to
Deploy, Install and Update
Windows Based Client
Applications
When you execute the project, you will see something like the following screen shot:
Now right click the project and click on Properties to get the Property window and then click on Publish Tab for
making the settings for deployment. Refer to the following screenshot. I have put in the publish location as a web
server path, that can be accessed via web browser using HTTP. Also one can select the availability of application,
whether online or offline mode and so on and so forth.
Related Research
There are additional settings like the Prerequisites for the application to work. By default .NET Framework is selected.
One can select additional components that are required to run the application as pre-requisite. Refer to the following
screenshot:
The Essential Guide to Mobile
App Testing: Tips for
Developers in USA & Canada
2 of 7
2/4/2014 12:07 PM
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
Below the Prerequisite button, there is an Updates button for specifying the checking of application updates.
Then Click on Options button to set the Publish Options in terms of language and the web page to get access of the
deployment. Refer to the following screenshot:
3 of 7
2/4/2014 12:07 PM
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
Once all the necessary settings are done, we can go ahead and simply Publish the application. Right click the Project
and click on Publish button and follow the screen instructions for deployment. Refer to the following screen shots:
4 of 7
2/4/2014 12:07 PM
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
Clicking Finish will Publish the application for availability over the net. Now you can browse the web folder to check
the files and folders that are published.
The following screen shows how to access the published application for installation / deployment.
5 of 7
2/4/2014 12:07 PM
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
You will also notice the following changes as a result of the installation:
An icon is added to the Start menu.
An entry is added in Control Panel -> Add/Remove Programs
From this point onwards, you can launch the application through the shortcut in the Start -> Programs menu.
From Add/Remove Programs, you can either completely uninstall the application or revert to the previous version, if
there was one.
With every deployment or update over the existing deployment, the same shall be downloaded by the client machine
once the connection is available to the server and the client installation gets updated automatically. The client
installation checks updates once the application starts.
Conclusion
So, by now we learnt how to use ClickOnce technology to deploy our Win Application and make the same available
over the net and how to manage the updates. This was a very simple example. For further studies, please refer to this
URL.
History
28th July, 2009: Initial post
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
6 of 7
2/4/2014 12:07 PM
http://www.codeproject.com/Articles/38546/Click-Once-Deployment-...
Robin_Roy
Comments and
Discussions
Spacing Relaxed
Noise Medium
Layout Normal
Go
Per page 50
Update
TheUltimateDebugger
13-Sep-13 1:19
AFournierDelphi
4-Jun-13 22:07
bhargavpp
My vote of 1
My vote of 4
ocrsdk.com/Free_Trial
10-Sep-12 19:51
31-Aug-12 6:09
27-Aug-12 18:44
Mike7491
19-Jan-11 12:00
14-Oct-10 9:39
000iceman000
17-Jan-10 2:51
my vote of 5
yanet2005
29-Oct-09 3:11
My Vote of 5
Aditithegreat
3-Sep-09 16:24
Re: My Vote of 5
Robin_Roy
6-Sep-09 18:08
Mastak.ua
2-Sep-09 3:38
Good Article
arvindcoolest
Robin_Roy
My Vote of 5
johnclark64
Re: My Vote of 5
brown20
10-Aug-09 16:51
Robin_Roy
17-Aug-09 21:07
AlexEvans
10-Aug-09 12:38
My vote of 1
Kjetil Klaussen
Zillode
28-Jul-09 9:19
My vote of 2
Kschuler
28-Jul-09 5:20
good
pimb2
28-Jul-09 2:04
Uwe Keim
28-Jul-09 10:22
pimb2
28-Jul-09 22:50
Uwe Keim
28-Jul-09 23:28
Re: good
Re: good
Re: good
Last Visit: 31-Dec-99 18:00
Suggestion
10-Aug-09 17:12
17-Aug-09 21:00
Re: My Vote of 5
News
17-Aug-09 21:00
Robin_Roy
My Vote of 5
General
10-Aug-09 17:18
Question
Bug
Answer
Joke
Rant
4-Aug-09 10:03
Refresh
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
Permalink | Advertise | Privacy | Mobile
Web01 | 2.8.140401.1 | Last Updated 28 Jul 2009
7 of 7
2/4/2014 12:07 PM