After deploying ClickOnce and changing the configuration file after installation

We are thinking about using ClickOnce for deployment. I'm not sure if this can be easily achieved using ClickOnce. We create the ClickOnce installer and distribute it to clients, and each client will install the ClickOnce installer on its own network. Each client user will run it from their local network.

The application has some settings in the configuration file. Each client will have its own parameter (all users under the client will use the same settings). My understanding is that after creating the ClickOnce package, clients cannot change the configuration file to set their own settings, or ClickOnce needs to be rewritten.

Do I understand correctly? Is there a workaround? Can an application access the update location for files not included in the ClickOnce manifest?

+7
clickonce
source share
4 answers

If you are targeting the 3.5 Framework, you do not need to sign up for ClickOnce deployments. Make sure the “Sign ClickOnce manifest” is not checked on the Icon tab of your project’s properties. This will allow you to edit the .plplication file after creating the deployment. Change the codebase attribute of the deployProvider ... tag
<deploymentProvider codebase="http://theirserver/.../Foo.application" />

This will not solve the problem of installing the application. If you are editing a file that you are deploying, the hash for the file must be regenerated.

Do you know what client setup should be? If so, maybe you can have separate configuration files for each client and do something with the pre-build event to copy the configuration files around?

Should the parameter be in the client configuration file? Could you save the settings on the server and pass it through the url parameter or get it when you call the web service after the application starts?

If these things do not work, you can provide your clients with a simple script (possibly using Mage ) so that they can regenerate and remove manifests (with their own certificate) after editing the deployment.

+3
source share

We use ClickOnce in our company, and I had to publish the package in the URL . However, in your case, you can always publish the DNS name and tell your customers to use the same DNS name on your network, and it should always work.

+1
source share

You can find my recent MSBuild blog post and several environments . Keep in mind that each of your customers may have their own “environment”, allowing you to individually determine their various configurations.

If you used this approach, you can still “sign” the deployment.

Good luck

+1
source share

Another not-so-good solution :

You can put the configuration files in different "additional groups" and load the specific configuration manually using ApplicationDeployment.DownloadFileGroup . But for me, this is not an ideal solution.

0
source share

All Articles