[。System.IO.FileLoadException在加载.NET程序集期间:错误0x8007007a

问题描述 投票:1回答:1

我们遇到了与在Windows 10版本1607计算机上启动一些内部开发的.NET应用程序有关的问题。有时启动应用程序不会成功。这是因为加载从属.NET程序集失败。错误消息是:

System.IO.FileLoadException:无法加载文件或程序集'[程序集名称],版本= [版本],文化=中性,PublicKeyToken = [publickeytoken]”或其依赖项之一。数据传递给系统调用的区域太小。 (来自HRESULT的异常:0x8007007A)

此问题大约发生在不同.NET应用程序中的应用程序启动的10%。它在32位和64位应用程序中都会发生。在所有启动过程中,还会启动许多其他可以启动的应用程序。我想知道为什么会出现0x8007007a错误?也许是由于之前发生过堆损坏而引起的抵押?

您可以从下面的FUSLOGVW中看到相关的日志记录。文件路径和程序集名称是匿名的。尝试加载的程序集的名称很长(59个字符,不带.dll后缀)。作为测试,我们将程序集的名称更改为较短的名称。不幸的是,问题仍然存在。在exe.config中添加探测路径也无法解决问题。

此外,Github上似乎有较旧版本的Microsoft Assembly Resolver的代码:https://github.com/fixdpt/shared-source-cli-2.0。我怀疑adlmgr.cpp中的ConstructCodeBaseList有问题。但我不知道是什么引发了问题。

*** Assembly Binder Log Entry  (2020/01/30 @ 13:48) ***

The operation failed.
Bind result: hr = 0x8007007a. The data area passed to a system call is too small.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Program Files (x86)\XXX\XXX\XX.X.X.X\XXX\XXXXXXXXXXXXXX\ApplicationWeWantToStart.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = AnAssem.blyWi.th.AVeryLon.gNameAA.AAAAAAAA.AAAAAAAAAAA.AAAA, Version=13.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/XXX/XXX/XX.X.X.X/XXX/XXXXXXXXXXXXXX/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = ApplicationWeWantToStart.exe
Calling assembly : ApplicationWeWantToStart, Version=13.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\XXX\XXX\XX.X.X.X\XXX\XXXXXXXXXXXXXX\ApplicationWeWantToStart.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: AnAssem.blyWi.th.AVeryLon.gNameAA.AAAAAAAA.AAAAAAAAAAA.AAAA, Version=13.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXX
LOG: GAC Lookup was unsuccessful.
ERR: Error occurred constructing the probing codebase list.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x8007007a).
c# .net binding .net-assembly fusion
1个回答
0
投票

任何更改您的启动问题都可能与此Microsoft Support Link相关

© www.soinside.com 2019 - 2024. All rights reserved.