Is there a way to rename a deployed ClickOnce application?
Asked Answered
V

4

11

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?

Vary answered 5/1, 2010 at 16:4 Comment(1)
Not really an answer, but in the past when I've needed to make breaking changes to a click once app I update the old version to display a link on startup to the changed new version and then refuse to go any further. This directs all users to the new app and effectivly forces an upgrade.Sybilsybila
V
9

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.

Vivianne answered 30/3, 2010 at 1:40 Comment(1)
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.Vary
A
1

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.

Application answered 5/1, 2010 at 16:8 Comment(0)
F
1

If you only want to change the "Start Menu" name and "Add/Remove Programs" name, you can change the "Product Name" without changing the assembly name. I did a quick test and updates still seem to work on a test certificate, but you should test it yourself to make sure.

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.

  2. Click the Publish tab.

  3. Click the Options button to open the Publish Options dialog box.

  4. Click Description.

  5. In the Publish Options dialog box, enter the name to display in Product name.

  6. Optionally, you can enter a publisher name in Publisher name.

From https://learn.microsoft.com/en-us/visualstudio/deployment/how-to-specify-a-start-menu-name-for-a-clickonce-application?view=vs-2019

Foredo answered 12/2, 2021 at 0:3 Comment(0)
D
0

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.
Dermatologist answered 5/1, 2010 at 16:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.