System.IO.FileLoadException。无法加载辅助功能,版本= 2.0.0.0

时间:2011-05-02 16:02:52

标签: exception windows-7 unhandled-exception global-assembly-cache

我刚刚遇到这个问题,可能是因为我在我的机器上安装了一些东西。我不记得了。每隔一段时间我就会收到一个在我的计算机上弹出的Microsoft .NET Framework消息框,它告诉我:

  

“应用程序中的组件中发生了未处理的异常。如果单击”继续“,应用程序将忽略此错误并尝试继续。

     

无法加载文件或程序集'辅助功能,   版本= 2.0.0.0,文化=中立,   PublicKeyToken = b03f5f7f11d50a3a'或其中一个   依赖。给定的程序集名称或代码库“

我尝试重新安装.net 4.0框架。我找不到.net 2.0框架下载来重新安装它。我尝试使用gacutil / uf辅助功能强制卸载该DLL,但这不起作用。我还检查了Accessibility dll的安装位置,并将其与其他机器进行了比较,所有内容都相同,包括global.config和web.config。

此异常不仅发生在我的计算机上的一个进程中。由于这是我的GAC的一个问题,任何使用此程序集的应用程序都会抛出相同的异常。

我打开了使用Fusion的绑定日志记录,详细信息告诉我:

"See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly 'Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
File name: 'Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)
   at System.Windows.Forms.Control.WmCreate(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

=== Pre-bind state information ===
LOG: User = CORP\agg9909
LOG: DisplayName = Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Intel/Intel(R) Management Engine Components/IMSS/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IMSS\PrivacyIconClient.exe.Config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: The same bind was seen before, and was failed with hr = 0x80131047.



************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
PrivacyIconClient
    Assembly Version: 6.0.40.1213
    Win32 Version: 6.0.40.1213
    CodeBase: file:///C:/Program%20Files%20(x86)/Intel/Intel(R)%20Management%20Engine%20Components/IMSS/PrivacyIconClient.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
AMT_COM_InterfaceLib
    Assembly Version: 1.0.0.0
    Win32 Version: 6.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Intel/Intel(R)%20Management%20Engine%20Components/IMSS/AMT_COM_InterfaceLib.DLL
----------------------------------------
AMT_SW_GUI
    Assembly Version: 1.0.3538.22155
    Win32 Version: 1.0.0.20
    CodeBase: file:///C:/Program%20Files%20(x86)/Intel/Intel(R)%20Management%20Engine%20Components/IMSS/AMT_SW_GUI.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box."

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:2)

您的Accessibility.dll很可能已损坏。即使是管理员,您也无法删除该文件。

您必须进入安全设置并将所有者从TrustedInstaller更改为其他用户,并授予您自己对该文件的权限。完成后,从正在运行的计算机上获取Accessibility.dll并替换损坏的版本。

最好我能猜到,来自Microsoft的安装程序损坏了DLL,因为没有用户有权编辑/删除/替换TrustedInstaller拥有的文件。