質問

プラグインとしてたくさんのアセンブリをロードするサービスがあります。これらのプラグインのそれぞれは、GACにインストールされている共通のアセンブリを参照しています。何らかの理由で、いくつかのプラグインはGACからアセンブリを正常にロードすることができますが、他のプラグインが失敗します。なぜこれが起こるのかを理解できないようです。これが機能しないもののフュージョンログは次のとおりです。

*** Assembly Binder Log Entry  (12/3/2011 @ 10:54:47 AM) ***



The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\Microsoft.NET\Framework\v4.0.30319\AddInProcess.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\SYSTEM
LOG: DisplayName = OSAE.API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f47a6446f36f79f7
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/OSA/AddIns/ZWave
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : OSAE.Zwave, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
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: OSAE.API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f47a6446f36f79f7
LOG: Found assembly by looking in the GAC.
LOG: Binding succeeds. Returns assembly from C:\Windows\Microsoft.Net\assembly\GAC_MSIL\OSAE.API\v4.0_1.0.0.0__f47a6446f36f79f7\OSAE.API.dll.
LOG: Assembly is loaded in default load context.

失敗した:

*** Assembly Binder Log Entry  (12/3/2011 @ 10:54:46 AM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\Microsoft.NET\Framework\v4.0.30319\AddInProcess.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\SYSTEM
LOG: DisplayName = OSAE.API, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/OSA/AddIns/Web Server
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : OSAE.WebServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files/OSA/AddIns/Web Server/OSAE.API.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/OSA/AddIns/Web Server/OSAE.API/OSAE.API.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/OSA/AddIns/Web Server/OSAE.API.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/OSA/AddIns/Web Server/OSAE.API/OSAE.API.EXE.
LOG: All probing URLs attempted and failed.
役に立ちましたか?

解決

故障したアセンブリは強く署名されていません(publicKey = null)。アセンブリが署名されていない理由はわかりませんが、強く署名されたアセンブリのみがGACに入ることができるため、ローダーがGACを見る必要はありません。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top