安装Clickone应用程序的并发实例 - 无需更改程序集名称

安装Clickone应用程序的并发实例 - 无需更改程序集名称

问题描述:

大家好,

我们使用Clickonce部署了一个Windows应用程序。 

We have a Windows application deployed using Clickonce. 

我们有多个测试环境和一个生产。

We have multiple test environments along with one Production.

要求是同时安装多次点击一次应用程序。 

The requirement is to install multiple instances of click once application simultaneously. 

即两个测试环境一起运行。

i.e have two test environments run together.

我通过在csproj文件中转换不同环境的程序集名称来实现这一目的。

I accomplished this by transforming the assembly name in the csproj file for different environments.

这也是本博客推荐的方法:

That's also the approach recommended in this blog:

https://robindotnet.wordpress.com/2009/04/22/clickonce-installing-multiple-versions-concurrently/

https://robindotnet.wordpress.com/2009/04/22/clickonce-installing-multiple-versions-concurrently/

但是我们遇到了问题,因为有与我们的应用程序通信的第三方软件使用程序集名称。因此,更改它不是一个选项。

However we have a problem because there is a third party software which communicates with our application, uses the assembly name. So changing it will not be an option.

我正在寻找可以同时运行clickonce应用程序的多个实例而不更改程序集名称的替代方法。

I am looking for alternate approaches where multiple instances of a clickonce application can be run simultaneously without changing assembly name.

我担心简短的回答是否,来运行ClickOnce应用程序的并发版本,你必须更改AssemblyName ,并且建议你也在Publish属性中更改ProductName,这样你就可以在开始菜单中告诉
哪个是哪个。

I'm afraid the short answer is no, 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.

例如,假设您需要为同一用户部署同一应用程序的两个不同版本。一种常见的情况是,您需要部署"生产"部分。和"QA"同一台机器上同一
用户的相同应用程序的版本。上述方案的主要问题如下:

Let's say, for example, you need to deploy two different versions of the same application for the same user. One common scenario is when you have the need to deploy a "Production" and a "QA" version of the same application for the same user on the same machine. The main problem with the scenario above is the following:

您可以对包含不同App.Config文件的不同安装URL执行两个不同的ClickOnce发布。一个App.config文件指向"生产"文件。数据库和其他指向"QA"的数据库。数据库。

You can execute two different ClickOnce publications to different Installation URL’s that contain a different App.Config file. One App.config file points to the "Production" database and the other points to the "QA" database.

这种方法的问题在于,一旦用户安装了"生产"数据库。应用程序,然后安装"QA",然后安装"QA"。应用程序,第二个安装将覆盖第一个安装。

The problem with this approach is that once a user installs the "Production" application and then installs the "QA" application, the second installation will override the first installation.

原因是ClickOnce出版物认为它是相同的应用程序,因此,"生产"和"生产"。将使用"QA"覆盖app.config。的app.config。最终结果是两个应用程序将与每个
其他应用程序冲突。它永远不会奏效。

The reason for this is that the ClickOnce publication thinks that it is the same application, so, the "Production" app.config will be over written with the "QA" app.config. The end result is that both applications will collide with each other. It will never work.

为了解决此问题,您将会 必须更改应用程序的程序集名称和产品名称。

您可以从以下主题获取更多详细信息:

You can get more detailed information from the following threads:

运行ClickOnce应用程序的并发版本

ClickOnce部署 - 部署同一版本的多个版本申请

问候,

Stanly

注意:此回复包含对a的引用第三方万维网站点。 Microsoft提供此信息是为了方便您。 Microsoft不控制这些网站,也未测试在这些网站上找到的任何软件或信息;因此,
Microsoft不能就其中发现的任何软件或信息的质量,安全性或适用性做出任何陈述。使用互联网上的任何软件都存在固有的危险,微软提醒您在从互联网上检索任何软件之前,确保您完全了解风险。

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.