You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

特定机器上ClickOnce WPF最新版本本地安装激活失败求助

问题描述

环境概述

我们有3台测试服务器,配置如下:

名称操作系统系统版本.NET版本CLR版本
TS1Win7 Pro SP16.1.7601.655364.5.512094.0.30319.34209
TS2Wsrv2008r2 SP16.1.7601.655364.8.037614.0.30319.42000
TS3W11 Pro (22H2)10.0.22621.04.8.090324.0.30319.42000

应用套件包含Windows服务和交互式应用,后者通过ClickOnce包部署到IIS,测试时从应用服务器下载并本地安装(含升级旧版本)。

将两个ClickOnce WPF应用命名为A和B,后缀1代表旧版本,2代表最新版本。版本2的A和B仅修改了UI行为,未改动引用、依赖,未编辑项目文件,构建流程完全一致(脚本执行)。A和B性质相似,仅A引用了System.DirectoryServices.AccountManagement。

故障现象

  • 部署到TS3的A2,管理员本地下载安装失败
  • 部署到TS1的A2,在TS3上由管理员下载安装时出现完全相同的失败
  • 部署到TS1的A2,管理员本地下载安装完全正常
  • 部署到TS3的A2,在TS1或TS2上由管理员本地下载安装完全正常
  • B1和B2可任意部署安装,不受服务器限制

A2仅在TS3上的激活阶段失败,且失败发生在询问用户是否安装未知发布者应用之前(使用Visual Studio生成的自签名测试证书签名ClickOnce部署)。

错误日志

PLATFORM VERSION INFO
    Windows             : 10.0.22621.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.42000
    System.Deployment.dll       : 4.8.9032.0 built by: NET481REL1
    clr.dll             : 4.8.9139.0 built by: NET481REL1LAST_B
    dfdll.dll           : 4.8.9032.0 built by: NET481REL1
    dfshim.dll          : 10.0.22621.30000 (WinBuild.160101.0800)

SOURCES
    Deployment url          : http://desktop-vtq5f2f/AppAch/client/AppAcw.application

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of http://desktop-vtq5f2f/AppAch/client/AppAcw.application resulted in exception. Following failure messages were detected:
        + The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [3/1/2023 12:39:54 PM] : Activation of http://desktop-vtq5f2f/AppAch/client/AppAcw.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [3/1/2023 12:40:03 PM] System.Runtime.InteropServices.COMException
        - The referenced assembly is not installed on your system. (Exception from HRESULT: 0x800736B3)
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Internal.Isolation.IStore.GetAssemblyInformation(UInt32 Flags, IDefinitionIdentity DefinitionIdentity, Guid& riid)
            at System.Deployment.Internal.Isolation.Store.GetAssemblyManifest(UInt32 Flags, IDefinitionIdentity DefinitionIdentity)
            at System.Deployment.Application.ComponentStore.GetAssemblyManifestFromStore(DefinitionIdentity asmId)
            at System.Deployment.Application.ComponentStore.GetAssemblyManifestWithRetry(DefinitionIdentity asmId, TimeSpan retryInterval, Int32 maxRetryCount)
            at System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(DefinitionIdentity subId)
            at System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInternal(SubscriptionState subState)
            at System.Deployment.Application.SubscriptionStore.CheckAndReferenceApplication(SubscriptionState subState, DefinitionAppId appId, Int64 transactionId)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
            at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
            at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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.

排查动作

  1. 在TS3上搜索System.DirectoryServices.AccountManagement.dll,确认该文件存在于以下路径:
    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.DirectoryServices.AccountManagement\v4.0_4.0.0.0__b77a5c561934e089
    C:\Windows\Microsoft.NET\Framework\v4.0.30319
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319
    
  2. 验证A1可在TS3正常下载安装,将A2文件夹复制到TS3也能正常运行,排除引用库缺失问题,确定故障出在安装环节
  3. 搜索错误码0x800736B3,确认该错误对应winerror.h中的ERROR_SXS_ASSEMBLY_NOT_FOUND;查阅相关案例,部分案例无有效解答,另有案例提到清理ClickOnce缓存,但该操作已执行无效:
    • 执行rundll32 %SystemRoot%\system32\dfshim.dll CleanOnlineAppCache删除C:\Users\Admin\AppData\Local\Apps\2.0下的所有文件和大部分子文件夹,重启TS3后故障依旧
    • 执行mage.exe -cc,无效果
  4. 检查Windows事件日志,无相关记录

疑问与求助

逻辑上判断问题出在TS3,但具体是什么问题?该如何进一步排查?

Side-by-side assembly(SxS)提示问题出在系统而非应用,但为何之前从未出现?为何只影响A2这一个应用?


内容的提问来源于stack exchange,提问作者Astrogator

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.29 20:37:21