public static void Main() { // You can start with only a url to a manifest file. string manifestUrl = "http://fusiontest/clickonce/test/adriaanc/AVPad/avpad_0.0.3010.0/microsoft.avalon.avpad.manifest"; // Or start with a locally cached manifest file and provide the appbase. //string manifestUrl = "file://c:/Documents and Settings/adriaanc/Local Settings/My Programs/__temp__/x86_Microsoft.Avalon.AvPad_0.0.3110.0_332CDF2FABC_en/microsoft.avalon.avpad.manifest"; //string appBase = "http://fusiontest/clickonce/test/adriaanc/AVPad/avpad_0.0.3010.0/"; // Construct the moniker given a url to the manifest. ApplicationMoniker am = new ApplicationMoniker(manifestUrl, null); // If we had a locally cached manifest we would specify the local manifest url and // url for the application base (appbase) instead. // ApplicationMoniker am = new ApplicationMoniker(manifestUrl, appBase); // Monolithic download of app bits the easy way. // Walk through the manifest and download files, dependent // assemblies. note - modules not yet supported, coming soon. am.DownloadManifestAndDependencies(); // You can delete all application files cached locally by calling this. //am.PurgeFiles(); // Progressive rendering download - register the application base as prefix // for the application moniker and download bits using standard // system.net apis. If you have not called PurgeFiles above, all requests // will be satisfied from cache. WebRequest.RegisterPrefix(am.AppBase, am); DoManualDownload(am, manifestUrl); }