BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News New UWP and Win32 Application Distribution Models

New UWP and Win32 Application Distribution Models

This item in japanese

Bookmarks

.NET has had support for applications that can automatically update themselves since the introduction of ClickOnce technology in 2005. Under the ClickOnce model, WinForms and WPF applications would check a pre-configured location on startup for newer versions. But this wasn't carried over to UWP because Microsoft was trying to emulate the iOS app store model.

Realizing most of their business customers can't publish their LOB applications to the Windows Store, and don't want to manage their own "store for business", Microsoft has slowly been loosening the earlier restrictions. First, we gained the ability to "sideload" an application without the use of an app store. But that requires manually updating the application.

Starting in the upcoming Windows 10 version 1804, you will be able to distribute automatically updating applications without the app store. This uses the same model as ClickOnce, wherein two new files will be generated along with the msix package. An index.html page which can be customized to suit your needs and an .appinstaller file that serves the same role as a ClickOnce manifest file.

Using this technology requires you set the minimum version of your application to 1804. You cannot simultaneously support older versions of Windows 10 and automatic updating.

Applications can be configured to check for updates each time it is run or periodically in the background. Later in the year you will also be able to mark updates as mandatory, which would be used when there is a security vulnerability or the services the application communicates with have an incompatible change.

Differential Updates

One known issue with ClickOnce is it required downloading the entire application each time a new version was released. With this new model, differential updates are supported. This should reduce the typical install time to a few seconds.

WinForms/WPF

If you are using the Windows Application Packaging project with your Win32 application (i.e. WinForms or WPF), they will also support this style of automatic updating.

Limited/Differential Releases

A common need is the ability to release a version of the application to a limited number of users, essentially beta testing, before rolling it out to the entire company. There are several options for this.

The first is to simply build two distribution websites. Users would then choose install from either the preview or main website. Switching between the two would involve manually uninstalling the application before installing from the other website.

For a more sophisticated setup, you can modify the instructions in David Cooksey's article, Fine Grained Versioning with ClickOnce. This hides the application manifest behind a simple website so that it can check the user's credentials before delivering them the version they've been assigned.

The third option is to use the Visual Studio App Center. This allows you to setup distribution groups for your application.

Rate this Article

Adoption
Style

BT