Change application configuration in an already published ClickOnce app

For a detailed description, se this excellent article:

http://blogs.msdn.com/b/vsto/archive/2009/04/29/signing-and-re-signing-manifests-in-clickonce.aspx

Quick steps

1) Remove the .deploy filextension from all files within your Application Files folder

2) Edit the .config file as requested

3) Start a Visual Studio console prompt and navigate the Application Files folder with the current version

4) Run command
mage –update Myapplication.exe.manifest

5) Re-enter the .deploy filextension to all files except the xxx.application and xxx.manifest

6) Run command
mage -update Myapplication.application -appmanifest Myapplication.exe.manifest

7) Then move back up to the folder where the publish.htm and the other .application files exist and run command
mage -update Myapplication.application -appmanifest “Application Files\Myapplication_1_2_0_13\Myapplication.exe.manifest”

8) You’re done

Errors that might occur:

System.Deployment.Application.DeploymentException (Subscription)

Unable to install this application because an application with the same identity is already installed. To install this application, either modify the manifest version for this application or uninstall the preexisting application.

Solution

Run command ”mage –cc” to clear ClickOnce cache.

One thought on “Change application configuration in an already published ClickOnce app

Leave a comment