简介:
我们有3个相关的测试服务器:
name OS version .NET CLR
TS1 Win7 Pro SP1 6.1.7601.65536 4.5.51209 4.0.30319.34209
TS2 Wsrv2008r2 SP1 6.1.7601.65536 4.8.03761 4.0.30319.42000
TS3 W11 Pro (22H2) 10.0.22621.0 4.8.09032 4.0.30319.42000
我们的应用程序套件由 Win 服务和交互式应用程序组成。后者作为 ClickOnce 包部署到 IIS。
在应用程序服务器上开始测试,并在本地下载并安装 CO 应用程序(升级以前的版本)。
我们将这两个 CO WPF 应用程序命名为 A 和 B,后跟 1(先前版本)或 2(最新版本)。
构建 2 中对 A 和 B 的更改仅涉及 UI 行为。引用和依赖关系没有被触及,项目没有被编辑,没有新文件,没有删除。构建过程始终相同(通过脚本)。 A 和 B 本质上相似,并且引用相同的库,但有 1 个例外:A 使用
System.DirectoryServices.AccountManagement
。
观察结果:
A2 在 TS3 上失败激活阶段(见下文),但仅在 TS3 上。 B2 在任何测试机器上都很满意。
失败发生在用户被询问是否应安装来自未知发布者的应用程序之前(我们使用由 VisualStudio 生成的用于签署 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.
逻辑结论是:TS3 错了,对吧?但是
什么,以及我该如何弄清楚?
我在 TS3 上搜索了System.DirectoryServices.AccountManagement.dll
C:\Windows\Microsoft.NET>dir /s System.DirectoryServices.AccountManagement.dll
Directory of C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.DirectoryServices.AccountManagement\v4.0_4.0.0.0__b77a5c561934e089
05/06/2022 22:20 System.DirectoryServices.AccountManagement.dll 290,720 bytes
Directory of C:\Windows\Microsoft.NET\Framework\v4.0.30319
05/06/2022 22:20 System.DirectoryServices.AccountManagement.dll 290,720 bytes
Directory of C:\Windows\Microsoft.NET\Framework64\v4.0.30319
05/06/2022 22:20 System.DirectoryServices.AccountManagement.dll 290,720 bytes
A1 下载并安装得很好。 A2,文件夹-x复制到TS3,运行没有任何问题.
我的结论是:TS3 上引用的库中没有丢失任何内容,因此问题必须特定于安装。
为了所有人的热爱,微软,
为什么要从日志中省略有问题的文件的名称?!
Windows事件日志没有任何我多次尝试的痕迹,所以它没有用。
类似错误搜索:
谷歌搜索+System.Runtime.InteropServices.COMException 0x800736B3
让我看到以下内容:
ERROR_SXS_ASSEMBLY_NOT_FOUND
rundll32 %SystemRoot%\system32\dfshim.dll CleanOnlineAppCache
C:\Users\Admin\AppData\Local\Apps\2.0
下的所有文件和大多数子文件夹。我重启了 TS3,仍然抛出错误。
mage.exe -cc
没有什么区别。Side-by-side assembly
(SxS,真是一颗宝石!
)暗示了系统中的某些内容,而不是应用程序,但是为什么它以前从未发生过,以及为什么它影响一个应用程序而不影响另一个应用程序? 给我上色困惑!有人知道吗?我应该在哪里挖?
在接受答案的评论中提到的
,“删除%USERPROFILE%\Local Settings\Apps\2.0
内的所有文件夹的手动方法有效”。
就我而言,它是
%USERPROFILE%\AppData\Local\Apps\2.0
。不需要删除整个
\2.0
文件夹,由@Erdem在他的答案
中建议。是的,无论哪种方式清理 ClickOnce 缓存都会删除所有 CO 应用程序 -
对于此用户。
1) Rename C:\Users\{UserName}\AppData\Local\Apps\2.0 to
C:\Users\{UserName}\AppData\Local\Apps\2.0A
2) Install the ClickOnce app as a new install - this will create
a new C:\Users\{UserName}\AppData\Local\Apps\2.0
3) Copy all folders from C:\Users\{UserName}\AppData\Local\Apps\2.0
to C:\Users\{UserName}\AppData\Local\Apps\2.0A
4) Rename C:\Users\{UserName}\AppData\Local\Apps\2.0
to C:\Users\{UserName}\AppData\Local\Apps\2.0B
5) Rename C:\Users\{UserName}\AppData\Local\Apps\2.0A
to C:\Users\{UserName}\AppData\Local\Apps\2.0