Question

My company has a ClickOnce application that has been in use with our customers for about a year now.

We're going through a re-branding and want to change the name of the application. However, just changing all of the normal name options in Visual Studio, and then building a new deploy obviously changes the manifests that the existing application is looking for, so essentially any installed applications never see the new updates.

I've tried messing around with the .application file, but I haven't been able to get anything to work yet. Is there a way to rename a deployed ClickOnce application, or do we have to get people to just install the new application?

Was it helpful?

Solution

If you want to run two different versions of an application, all you have to change is the assembly name to make ClickOnce think it's a different version. Which makes me wonder if you don't change the assembly name of your main application if it would still appear to ClickOnce as the same application.

If you have to change the assembly name (and I would), then you are going to have to have your users uninstall and reinstall the application. You can do this programmatically for them; it only takes a minute.

The MSDN article Certificate Expiration in ClickOnce Deployment on ClickOnce certificate expiration shows you how to programmatically uninstall a ClickOnce application and reinstall it from a different URL (the code is available). We've done this a couple of times, and it works really well and isn't that intrusive to the users.

I'm pretty certain you can't just build the new version to a new URL and copy the deployment manifest into the old deployment folder, because you are changing the application identity, and it won't recognize it as an update, but you could always try it.

OTHER TIPS

Unless you have it built into the application you will need to redeploy it. You can rename the file, but the GUI will not be changed without something in the code behind to do it.

This article from MSDN might be useful:

Walkthrough: Manually Deploying a ClickOnce Application

One of the posts states trying the following.

Unfortunately Mage does not have functionality to support .deploy-renaming. A workaround is to:

  1. Generate the application manifest.
  2. Sign the application manifest.
  3. Add the .deploy extension to all files except the .manifest file
  4. Create the application manifest, modify the deployment tag, and add parameter mapFileExtensions="true".
  5. Sign the application manifest.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top