Information was presented by Kate Gregory of Gregory Consulting Limited (http://www.gregcons.com/). Kate is a Microsoft C++ MVP and a Regional Director. Her email address is email@example.com.
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
Private Sub ad_DownloadFileGroupCompleted(ByVal sender As Object, _
ByVal e As System.Deployment.Application.DownloadFileGroupCompletedEventArgs) _
Dim f As New OnDemandForm.OnDemandForm
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.
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.
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.
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.
Post a Comment