.net ClickOnce 错误:部署标识与订阅不匹配

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3100050/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 14:26:39  来源:igfitidea点击:

ClickOnce Error: The deployment identity does not match the subscription

.netclickonceidentitymanifestsubscription

提问by Kiquenet

I'm using Visual Studio 2008SP1.

我正在使用Visual Studio 2008SP1。

I have a Windows Forms application deployed internally using ClickOnce in a shared folder on the local network.

我在本地网络上的共享文件夹中使用 ClickOnce 在内部部署了一个 Windows 窗体应用程序。

The test certificate pfx expires in 2035.

测试证书 pfx 于 2035 年到期。

I have published the update to the internal shared folder several times.

我已多次将更新发布到内部共享文件夹。

Note that the project is only set to 'Sign the ClickOnce manifests' and does not sign the assembly.

请注意,该项目仅设置为“签署 ClickOnce 清单”,而不签署程序集。

Now, I again publish a new version of my application.

现在,我再次发布我的应用程序的新版本。

When users click on their icons to run the application we get this error (it had always updated prior to deploying with the test certificate).

当用户单击他们的图标来运行应用程序时,我们会收到此错误(在使用测试证书进行部署之前,它总是会更新)。

Dirección URL de la implementación :
file:///C:/Documents%20and%20Settings/Usuario.NOTARIAS3/Men%C3%BA%20Inicio/Programas/GrupoBackup/Expediente%20Electr%C3%B3nico.appref-ms%7C
Dirección URL del proveedor de la implementación :
file://192.168.13.111/compartida/AdministradorWin.application La
activación de C:\Documents and Settings\Useuario.NOTARIAS3\Menú
Inicio\Programas\GrupoBackup\Expediente Electrónico.appref-ms| dio
como resultado una excepción. Se detectaron los siguientes mensajes de
error:
+ The deployment identity does not match the subscription


OPERATION PROGRESS STATUS * [2/20/2008 11:23:21 AM] : Activation of
C:\Documents and Settings\Usuario.NOTARIAS3\Menú
Inicio\Programas\GrupoBackup\Expediente Electrónico.appref-ms| has
started. * [2/20/2008 11:23:21 AM] : Performing necessary update
check as specified by the deployment.

实施
目录URL : file:///C:/Documents%20and%20Settings/Usuario.NOTARIAS3/Men%C3%BA%20Inicio/Programas/GrupoBackup/Expediente%20Electr%C3%B3nico.appref-ms%7C
Dirección URL delprovedor de la implementationación :
file://192.168.13.111/compartida/AdministradorWin.application La
activación de C:\Documents and Settings\Useuario.NOTARIAS3\Menú
Inicio\Programas\GrupoBackup\Expediente Electrónico.appref-ms| dio
como resultado una excepción。Se detectaron los siguientes mensajes de
error:
+ The deployment identity does not match the subscription


OPERATION PROGRESS STATUS * [2/20/2008 11:23:21 AM] : Activation of
C:\Documents and Settings\Usuario.NOTARIAS3\Menú
Inicio\Programas\GrupoBackup\Expediente Electrónico.appref-ms| 已经
开始。* [2/20/2008 11:23:21 AM]:
按照部署执行必要的更新检查。

ERROR DETAILS

错误详情

  • [21/06/2010 20:33:10] System.Deployment.Application.DeploymentException (SubscriptionState)
  • La identidad de la implementación no coincide con la suscripción.
  • Origen: System.Deployment
  • Seguimiento de la pila: en System.Deployment.Application.SubscriptionStore.CheckUpdateInManifest(SubscriptionState
    subState, Uri updateCodebaseUri, AssemblyManifest deployment, Version
    currentVersion) en
    System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState&
    subState, String& errorPageUrl) en
    System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String
    shortcutFile, String& errorPageUrl, TempFile& deployFile) en
    System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
    activationUri, Boolean isShortcut, String textualSubId, String
    deploymentProviderUrlFromExtension, BrowserSettings browserSettings,
    String& errorPageUrl) en
    System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
    state)
  • [21/06/2010 20:33:10] System.Deployment.Application.DeploymentException (SubscriptionState)
  • La identidad de la implementationación no concurrent con la suscripción。
  • Origen:系统部署
  • Seguimiento de la pila: en System.Deployment.Application.SubscriptionStore.CheckUpdateInManifest(SubscriptionState
    subState, Uri updateCodebaseUri, AssemblyManifest deployment, Version
    currentVersion) en
    System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState&
    subState, String& errorPageUrl) en
    System.Deployment。 Application.ApplicationActivator.ProcessOrFollowShortcut(String
    shortcutFile, String& errorPageUrl, TempFile& deployFile) en
    System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
    activationUri, Boolean isShortcut, String textualSubId, String
    deploymentProviderUrlFromExtension, BrowserSettings browserSettings,
    String& errorPageUrl) en
    System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象
    状态)

I use regedit to search for this key:

我使用 regedit 来搜索这个键:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\7e3a7433abfe6213

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\7e3a7433abfe6213

PC non updated

电脑未更新

AppId file://192.168.13.111/COMPARTIDA/AdministradorWin.application#AdministradorWin.app, Culture=neutral, PublicKeyToken=4b005ceeffd565b0, processorArchitecture=msil

AppId 文件://192.168.13.111/COMPARTIDA/AdministradorWin.application#AdministradorWin.app,Culture=neutral,PublicKeyToken=4b005ceeffd565b0,processorArchitecture=msil

Version = 1.0.0.14

版本 = 1.0.0.14

FileName = Expediente Electrónico

文件名 = Expediente Electronico

Publisher = GrupoBackup

发布者 = GrupoBackup

Folder Name = GrupoBackup

文件夹名称 = GrupoBackup

PC UPDATED(uninstall-reinstall, but I want to AVOID it)

PC 更新(卸载-重新安装,但我想避免它)

AppId file://192.168.13.111/compartida/AdministradorWin.application#AdministradorWin.application, Culture=neutral, PublicKeyToken=4b005ceeffd565b0, processorArchitecture=msil

AppId 文件://192.168.13.111/compartida/AdministradorWin.application#AdministradorWin.application,Culture=neutral,PublicKeyToken=4b005ceeffd565b0,processorArchitecture=msil

Version = 1.0.0.30

版本 = 1.0.0.30

FileName = Expediente Electrónico

文件名 = Expediente Electronico

Publisher = GrupoBackup

发布者 = GrupoBackup

Folder Name = GrupoBackup

文件夹名称 = GrupoBackup

SuiteName= OGF Suite

套件名称= OGF 套件

Changes PC Non updated - Pc updated are:

更改 PC 未更新 - 更新的 PC 是:

1.) Suite Name is new value (I set it in properties Publish tab in Visual Studio)

1.) 套件名称是新值(我在 Visual Studio 的属性发布选项卡中设置它)

2.) Version

2.) 版本

and 3.)

和 3.)

AdministradorWin.app

管理员Win.app

from file://192.168.13.111/COMPARTIDA/AdministradorWin.application#AdministradorWin.app,

来自文件://192.168.13.111/COMPARTIDA/AdministradorWin.application#AdministradorWin.app,

vs

对比

AdministradorWin.application,

管理员Win.application,

from file://192.168.13.111/compartida/AdministradorWin.application#AdministradorWin.application,

来自文件://192.168.13.111/compartida/AdministradorWin.application#AdministradorWin.application,

If I uninstall and then reinstall the app from scratch it all works. However, I was trying to avoid having to do this.

如果我卸载然后从头开始重新安装该应用程序,则一切正常。但是,我试图避免这样做。

I get this error when I try to deploy a project that was previously successful.

当我尝试部署以前成功的项目时,我收到此错误。

I re-tried, after deleting all the manifests, but still no joy.

删除所有清单后,我重新尝试,但仍然没有任何乐趣。

Is there a way to fix this?

有没有办法来解决这个问题?

In Publish Options -> Manifests

在发布选项 -> 清单中

Use application manifest for trust informationis UN CHECKED.

使用应用程序清单获取信任信息是未检查的。

回答by zezespecial

Did you change your target CPU from Any CPUto x86?

您是否将目标 CPU 从Any CPU更改为x86

If you changed this, you will have to reinstall the application.

如果您更改了此项,则必须重新安装该应用程序。

回答by RobinDotNet

What do you mean when you say the following? "Changes: I set Suite Name value; Version and #AdministradorWin.app, vs #AdministradorWin.application".

当您说以下内容时,您是什么意思?“更改:我设置了套件名称值;版本和#AdministradorWin.app,vs #AdministradorWin.application”。

It's the last bit I'm interested in. Did you change the assembly name?

这是我感兴趣的最后一点。您更改程序集名称了吗?

There are a handful of settings that make up the identity of the deployment. Target CPU (as noted by zezespecial above), installation URL, and assembly name are three of them. Did you change any of these? What other changes did you make to the deployment?

有一些设置构成了部署的标识。目标 CPU(如上面 zezespecial 所述)、安装 URL 和程序集名称是其中的三个。你有没有改变其中的任何一个?您对部署进行了哪些其他更改?

回答by RagtimeWilly

'Check Publish -> Installation Folder URL' and make sure it is not set incorrectly (sometimes it only shows up during publishing process)

'检查发布 -> 安装文件夹 URL' 并确保它没有设置错误(有时它只在发布过程中显示)

'Check Publish -> Updates...' and make sure the Update Location is not set incorrectly.

“检查发布 -> 更新...”并确保更新位置设置不正确。

To be absolutely sure set both these to be the same as the Publishing Folder Location. You'll need to tick 'The Application should check for update - Before the application starts'.

绝对确保将这两个设置为与发布文件夹位置相同。您需要勾选“应用程序应检查更新 - 在应用程序启动之前”。

I had to do this to fix issue in my case.

我必须这样做才能解决我的问题。