具有不同部署身份和相同应用程序身份的多个ClickOnce安装

问题描述:

对于不同的环境,我们具有相同程序集的多个部署以及不同的配置文件。我们将它们打包为具有不同部署标识(Program_ENV1,Program_ENV2等)的单独ClickOnce部署。

We have several deployments of the same assemblies with different configuration files for different environments. We package these up in to separate ClickOnce deployments with different Deployment Identities (Program_ENV1, Program_ENV2, etc.).

所有应用程序的身份均为Program.exe,因为我们有一个第三方组件,它要求使用该可执行文件的可执行文件具有与编译时相同的名称。

The Application Identity is Program.exe for all of them, because we have a third-party component that requires the executable using it to have the same name as it was compiled for.

当我们希望多次安装相同版本时在同一台计算机上进行测试(用于测试),我们会在安装时出现错误,表明已经存在具有相同应用程序标识的东西。

When we want to have multiple installs of the same version number on the same machine (for testing), we get an error on installation that something with the same application identity already exists.

我们不想进行单独的构建并为每个部署提供新的版本号(在XXX45程序集上已批准质量检查,而不是在XXX46版本上已通过质量检查。)

We don't want to make separate builds with new version numbers for each deployment (QA signed off on version X.X.X.45 assemblies, not version X.X.X.46).

是否有其他方法可以解决此问题?

Is there another way around this issue?

要运行ClickOnce应用程序的并发版本,必须更改AssemblyName,并且建议您还更改Publish属性中的ProductName,那么你 可以在开始菜单中分辨出哪个。

To run concurrent versions of a ClickOnce application, you must change the AssemblyName, and it's recommended that you also change the ProductName in the Publish properties, so you can tell in a start menu which one is which.

点击此处查看如何同时安装多个版本