c# - 部署 ClickOnce 应用程序时出错 - list 中的引用与下载的程序集的标识不匹配

标签 c# visual-studio-2010 clickonce

我正在尝试部署 ClickOnce 应用程序,但在客户端上安装失败。这是错误日志:

PLATFORM VERSION INFO
Windows             : 6.1.7601.65536 (Win32NT)
Common Language Runtime     : 4.0.30319.1
System.Deployment.dll       : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll             : 4.0.30319.1 (RTMRel.030319-0100)
dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment url          : http://MyProduct.com/download/workstation/MyProduct%20Front%20Desk.application
                    Server      : Microsoft-IIS/7.5
                    X-Powered-By    : ASP.NET
Deployment Provider url     : http://MyProduct.com/Download/Workstation/MyProduct%20Front%20Desk.application
                    Server      : Microsoft-IIS/7.5
                    X-Powered-By    : ASP.NET
Application url         : http://MyProduct.com/Download/Workstation/Application%20Files/MyProduct%20Front%20Desk_1_0_0_7/MyProduct%20Front%20Desk.exe.manifest
                    Server      : Microsoft-IIS/7.5
                    X-Powered-By    : ASP.NET

IDENTITIES
Deployment Identity     : MyProduct Front Desk.application, Version=1.0.0.7, Culture=neutral, PublicKeyToken=df343a0868ab2d74, processorArchitecture=msil
Application Identity        : MyProduct Front Desk.exe, Version=1.0.0.7, Culture=neutral, PublicKeyToken=df343a0868ab2d74, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://MyProduct.com/download/workstation/MyProduct%20Front%20Desk.application resulted in exception. Following failure messages were detected:
    + Reference in the manifest does not match the identity of the downloaded assembly MyProductSiteServer.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [03/17/11 11:51:04] : Activation of http://MyProduct.com/download/workstation/MyProduct%20Front%20Desk.application has started.
* [03/17/11 11:51:04] : Processing of deployment manifest has successfully completed.
* [03/17/11 11:51:04] : Installation of the application has started.
* [03/17/11 11:51:05] : Processing of application manifest has successfully completed.
* [03/17/11 11:51:06] : Found compatible runtime version 4.0.30319.
* [03/17/11 11:51:06] : Request of trust and detection of platform is complete.

ERROR DETAILS
Following errors were detected during this operation.
* [03/17/11 11:51:30] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
    - Reference in the manifest does not match the identity of the downloaded assembly MyProductSiteServer.exe.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
        at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
        at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
        at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
        at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
        at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
        at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

我需要部署的主要 exe 是 MyProductFrontDesk.exe,它依赖于 MyProductSiteServer.exe - 这似乎是引发错误的地方: “ list 中的引用与下载的程序集 MyProductSiteServer.exe 的标识不匹配。”

哪个 list 需要更正?以及如何?

最佳答案

an issue with Visual Studio 2008 which is solved by not embedding the default manifest - 该文章的评论之一表明该问题在 Visual Studio 2010 中仍然存在。

In project properties -> Application tab -> Resources -> checkbox Icon and manifest, the setting "Embed manifest with default settings" caused the problem. Setting it to "Create application without a manifest" fixes the problem.

关于c# - 部署 ClickOnce 应用程序时出错 - list 中的引用与下载的程序集的标识不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5337458/

相关文章:

c# - ObjectSet 包装器不适用于 linqToEntities 子查询

c# - 如何从 C# DLL 创建 .lib 文件?

c# - 强名称签名对此程序集 stdole.dll 无效

c# - WPF如何将ComboBoxes选定项目用作xctk :PropertyGrid's SelectedObject in MVVM

c# - 如何以Xamarin形式显示gif图像?

c# - 只有一个元素的数组到达 Controller

c++ - 是否有可在 Visual Studio 中编译的可用和许可版本的 strptime.h?

visual-studio-2010 - 如何解决 Visual Studio 2010 中的“不支持 “Validation (): Element ‘x’”警告

c# - 安装 .net 4.8 后,Clickonce 应用程序无法启动

clickonce - 在使用 mage.exe 构建时,如何允许 ClickOnce 应用程序使用 Url 参数?