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

What's in a Name

 A friend recently posted on social media the meaning of their name, which I thought was interesting. So I deciphered mine and came up with this: Traveler of heavenly waters, builder of ships .  This is my First, Last, Middle names deciphered thanks to the internet. I find this interesting since I love to be by water or in water. I also like to build things. I guess my name is a good name for me. Cheers, Wade PS. Here's some water, since I also like taking pictures. 😊

Matrix Rain Window

  I wanted a small application that would show a Matrix like rain window, so I converted C# code (link below) to VB.NET (links below). Original C# Code is here: My VB.Net Source Code: My created executable file is here:

Sunshine Reaching

With rays of warmth, he embraces her soul.  Arms, iron strong, surround their love. Sunshine reaching, fills the room.  With feathered whispers, they embrace the day. Poetry and picture by me. Picture taken in 2017 and re-edited today for this post. Cheers, Wade