开发者

Change update location at runtime for .NET ClickOnce deployment

开发者 https://www.devze.com 2023-02-22 15:27 出处:网络
I am exploring the possibility of using ClickOnce to publish an application. I would like to change the install and update location on a per-customer basis, so that customers can host the install and

I am exploring the possibility of using ClickOnce to publish an application. I would like to change the install and update location on a per-customer basis, so that customers can host the install and update folder on a local intranet if they want. I have read about this, and it would seem that the MageUI.exe tool will do some of this, but I am just wondering if anyone has used this in a production environment and how must of a problem is it? And does anyone have a link to a good guide on this?

I can imagine this would get complicated if say for example we have 40 customers each with their own deployment and hence 40 deployment manifests. Then I make a change to the application, I would have 开发者_Python百科to then create 40 new deployment manifests (could be done in a batch file I guess) and send these out?


I'm not happy about it - http://www.pcreview.co.uk/forums/dynamically-changing-updatelocation-runtime-t2310400.html

With this code you can access ad.UpdateLocation, but, you can't change it.

UpdateCheckInfo info = null;
if (!ApplicationDeployment.IsNetworkDeployed) return false;
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
ad.UpdateLocation = YOUR_FOLDER; // won't work

I think create a ApplicationDeployment at run time, and configure it all in run time is a good try... but I don't know if it will recognize the CurrentDeployment.


You may want to check the following articles below. There is a description of how to set up an application with multiple deployment support, but it requires involving the customer side.

  • Explanation of how to create ClickOnce for customer side to deploy
  • Walkthrough
0

精彩评论

暂无评论...
验证码 换一张
取 消