“ClickOnce deployment allows you to publish Windows-based applications to a Web server or network file share for simplified installation. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce. ”
Codeplex now supports ClickOnce, so I decided to give it a test drive! To deploy your ClickOnce application to Codeplex, follow this EXCELLENT guide!
Try it out at http://openpos.codeplex.com/releases/52004/clickOnce/OpenPOS.application.
Since I am now starting to “release” OpenPOS, I needed a better way to version it! Semantic versioning is a set of rules you should follow when creating public
APIs. I will be loosely following these rules in versioning OpenPOS. Currently, I am at version 0.1.1.
“As a solution to this problem, I propose a simple set of rules and requirements that dictate how version numbers are assigned and incremented. For this system to work, you first need to declare a public API. This may consist of documentation or be enforced by the code itself. Regardless, it is important that this API be clear and precise. Once you identify your public API, you communicate changes to it with specific increments to your version number. Consider a version format of X.Y.Z (Major.Minor.Patch). Bug fixes not affecting the API increment the patch version, backwards compatible API additions/changes increment the minor version, and backwards incompatible API changes increment the major version.”
Auto Update Click Once
One of the great “features" of ClickOnce is that I can make it automatically check for new versions and silently update itself! OpenPOS has an extension method (for the Application
class) called AutoUpdate()
. To enable Auto-Updating of the application, simply call AutoUpdate()
in your application class:
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
this.AutoUpdate(true);
}
}
Now the application will periodically poll the ClickOnce server (CodePlex) for updates! If a new update is found, it will prompt the user if she/he wants it installed!
Also Read
The source is available on Codeplex.
CodeProject