Skip to main content

ClickOnce Information from User Group Meeting

 Information was presented by Kate Gregory of Gregory Consulting Limited ( Kate is a Microsoft C++ MVP and a Regional Director. Her email address is

Tip 1
Download optional files asynchronously using ClickOnce and System.Deployment.Application.ApplicationDeployment

Here is some example VB code:

Public Class Form1
Private WithEvents ad As _
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment


End Sub

Private Sub ad_DownloadFileGroupCompleted(ByVal sender As Object, _
ByVal e As System.Deployment.Application.DownloadFileGroupCompletedEventArgs) _
Handles ad.DownloadFileGroupCompleted

Dim f As New OnDemandForm.OnDemandForm

End Sub
End Class

The solution has two projects where the form in the second project is named OnDemand. This form would be only downloaded as needed.

The key is to use the matching downloadFileGroup to the download group in the application files setup in the Publish tab under the solutions properties. 

Tip 2
Use a system like SMS or other computer control software to push the first install of an application. Then use ClickOne to manage future updates. The key here is to NOT push your application, but a stub that calls ClickOnce after the install to perform the first install. The VB.NET framework class that manages this is called InPlaceHostingManager.

Tip 3
Use an MSI to create the initial install. Use CorLaunchApplication class to start the application from ClickOnce network server using the manifest. There is not currently a lot of documentation on this functionality.

Tip 4
Use Server Side Extensions to manage multiple versions of the application. You can use ASP.NET to create application manifests on the fly to allow users to have different versions of the application. We could have all IS Application developer point to a test server and all others point to the production server. This needs to be setup before the first install is done.

Note: There is a command line tool called MAGE UI that can be run to edit the manifests. This is included in the .Net SDK and does not need Visual Studio installed to run.


Popular posts from this blog

Artist Friend's Art Links

 A few links from artist friends I know: Sue Buehler Kathleen Kent Lora Lee Chapman Heather Szarka Swee Oh David Robinson Gary Paakkonen Katie Wright Lauri Novak And here's one of my pics, just for fun!

Gallery Show Prints

Check out my post about my art in the upcoming 311 Gallery show.