有没有办法重命名已部署的 ClickOnce 应用程序?

发布于 2024-08-17 01:15:23 字数 264 浏览 3 评论 0原文

我的公司有一个 ClickOnce 应用程序,我们的客户已经使用该应用程序大约一年了。

我们正在进行品牌重塑,并希望更改应用程序的名称。但是,仅更改 Visual Studio 中的所有正常名称选项,然后构建新的部署显然会更改现有应用程序正在查找的清单,因此基本上任何已安装的应用程序都不会看到新的更新。

我尝试过摆弄 .application 文件,但我还没有能够让任何东西发挥作用。有没有办法重命名已部署的 ClickOnce 应用程序,或者我们是否必须让人们只安装新应用程序?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

2024-08-24 01:15:23

如果要运行应用程序的两个不同版本,您只需更改程序集名称即可使 ClickOnce 认为它是不同的版本。这让我想知道如果您不更改主应用程序的程序集名称,它仍然会在 ClickOnce 中显示为同一应用程序。

如果您必须更改程序集名称(我会),那么您将必须让您的用户卸载并重新安装该应用程序。您可以通过编程方式为他们执行此操作;只需一分钟。

MSDN 文章ClickOnce 部署中的证书过期 ClickOnce 证书过期时向您展示如何以编程方式卸载 ClickOnce 应用程序并从不同的 URL 重新安装它(代码可用)。我们已经这样做了几次,效果非常好,并且不会对用户造成干扰。

我非常确定您不能只是将新版本构建到新 URL 并将部署清单复制到旧部署文件夹中,因为您正在更改应用程序标识,并且它不会将其识别为更新,但是您总是可以尝试一下。

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.

水波映月 2024-08-24 01:15:23

除非您将其内置到应用程序中,否则您将需要重新部署它。您可以重命名该文件,但如果没有后台代码中的某些内容,GUI 将不会更改。

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.

旧人 2024-08-24 01:15:23

如果只想更改“开始菜单”名称和“添加/删除程序”名称,则可以更改“产品名称”而不更改程序集名称。我做了一个快速测试,更新似乎仍然适用于测试证书,但您应该自己测试以确保。

  1. 在解决方案资源管理器中选择项目后,在“项目”菜单上单击“属性”。

  2. 单击“发布”选项卡。

  3. 单击“选项”按钮打开“发布选项”对话框。

  4. 单击“说明”。

  5. 在“发布选项”对话框中,输入要在“产品名称”中显示的名称。

  6. 您也可以在发布者名称中输入发布者名称。

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

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

我们只是彼此的过ke 2024-08-24 01:15:23

MSDN 中的这篇文章可能有用:

演练:手动部署 ClickOnce 应用程序

其中一篇文章指出尝试以下操作。

不幸的是 Mage 没有功能支持.deploy重命名。解决方法是:

  1. 生成应用程序清单。
  2. 签署应用程序清单。
  3. .deploy 扩展名添加到除 .manifest 文件之外的所有文件中
  4. 创建应用程序清单,修改部署标记,并添加参数 mapFileExtensions="true".
  5. 签署应用程序清单。

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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文