Before I am going to tell an example which demonstrates the use of Click Once deployment technology, let’s firstly understand how this technology works.
You create a Windows Forms application and use the publish option to deploy the application on any of the following location such as File System, Local IIS Server, Remote IIS Server of FTP.
Once the application is deployed on target machine the users of the application can browse the file and install the application onto their system.
After installing the application a shortcut icon will be added to the User’s program menu as well as application is also added on Programs Feature of Control box where we can uninstall the application.
When the user launches the application again, the manifest will contain all the information to decide whether application has to go to the source location to download required updates file or not.
A simple application which demonstrate use of Click Once Deployment
For demonstrating click once application I had created a Customer Registration form which accept the details of customer and store it to the database.
Screen shot of Customer Registration Form
Steps for creating click once deployment
Open solution explorer of your project for which you want to develop click once application.
Right click on the solution explorer and then click properties. Properties window of your solution explorer will be open.
In properties window you have to specify configuration related with publishing your project such as Publish Location and Pre Requisite settings.
Click button in the front of publish location and select the location where you want to publish your application.
Then go to Install Mode and Settings from there select Application Files, Pre requisite Updates and option. By default Application files are selected. If you need to select any additional file then go to that option otherwise leave it.
Click on the Prerequisites button and select the prerequisites option for your application such as Windows Installer, SQL Server 2008 etc.
Click on the Updates Button and change the configuration setting for Update Information such as Before the application start or after the application start and version number etc.
Then finally click Publish button from Build Menu and follow the wizard instruction.
Then select the method through which you want to install such as via CD ROM or DVD.
Then told application to check the updates for your application.
Then click next button and followed by Finish button. Your application will be published. After publishing your application Visual studio open the location where application will be published.
Finally you can run the setup from that location where you publish it.