views:

170

answers:

3

My company has a ClickOnce 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 app is looking for, so essentially any installed apps never see the new updates.

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

A: 

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.

Hazior
A: 

This article from MSDN might be useful

http://msdn.microsoft.com/en-us/library/xc3tc5xx.aspx

One of the posts states trying the following

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

a) generate application manifest
b) sign application manifest
b) add .deploy extension to all files except .manifest file
c) create application manifest, modify deployment tag, add parameter mapFileExtensions="true" d) sign application manifest

Aaron M
A: 

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 app.

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.

This MSDN article on ClickOnce Certificate Expiration shows you how to programmatically uninstall a ClickOnce app 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.

http://msdn.microsoft.com/en-us/library/ff369721.aspx

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.

RobinDotNet
Hey, thanks for the links, very useful. I ended up just having the customers uninstall/reinstall, and used a 5-year cert with the new version, but I'll definitely come back and re-read this the next time I'm working with this stuff.
tobinibot
You're welcome. :-)
RobinDotNet