.net – way to rename a deployed ClickOnce application

clickoncenetrename

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?

Best Answer

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.