开发者

Assembly binding error - fusion log and dependency browser mismatch

I'm chasing down an assembly loading/binding error that has popped up recently. During my investigation I've found a confusing contradiction (assuming I'm parsing the fusion log correctly).

The exception that is thrown by my application at startup states:

{"Could not load file or assembly 'Microsoft.Practices.CompositeUI, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Microsoft.Practices.CompositeUI, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

Some recent project changes that I made should not require the strongly named assembly "Microsoft.Practices.CompositeUI". After confirming that all my solution projects are indeed referencing the unsigned assemblies I then fired up a dependency browser to make sure I wasn't missing anything. Everything checked out and I confirmed I didn't have any "old" references to the old assemblies. Of course I cleaned and rebuilt my project as well.

I then researched further and fired up the fusion log viewer (Fuslogvw.exe) and configured it to display binding errors. I viewed the log and found the binding error. The detail log is where the confusion starts; it lists the "Calling assembly" as an assembly that has NO bindings (that I can determine) to the missing assembly. Ah, it's hard to explain. Here is the log:

* Assembly Binder Log Entry (11/15/2010 @ 7:00:18 PM) *

The operation failed.

Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Program Files\PMT\Office App\1.1.1.7\OfficeApp.exe

--- A detailed error log follows.

=== Pre-bind state information ===

LOG: User = PMD\sklett

LOG: DisplayName = Microsoft.Practices.CompositeUI, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (Fully-specified)

LOG: Appbase = file:///C:/Program Files/PMT/Office App/1.1.1.7/

LOG: Initial PrivatePath = NULL

LOG: Dynamic Base = NULL

LOG: Cache Base = NULL

LOG: AppName = OfficeApp.exe

Calling assembly : Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

===

LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\Program Files\PMT\Office App\1.1.1.7\OfficeApp.exe.config

LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.

LOG: Post-policy reference: Microsoft.Practices.CompositeUI, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

LOG: GAC Lookup was unsuccessful.

LOG: Attempting download of new URL file:///C:/Program Files/PMT/Office App/1.1.1.7/Microsoft.Practices.CompositeUI.DLL.

LOG: Assembly download was successful. Attempting setup of file: C:\Program Files\PMT\Office App\1.1.1.7\Microsoft.Practices.CompositeUI.dll

LOG: Entering run-from-source setup phase.

开发者_如何学PythonLOG: Assembly Name is: Microsoft.Practices.CompositeUI, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=null

WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN

ERR: The assembly reference did not match the assembly definition found.

ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Now the calling assembly "Microsoft.Practices.EnterpriseLibrary.Common" does not have any listed (via dependency browser) dependencies to "Microsoft.Practices.CompositeUI". Not only that, but it shouldn't have any.

the fusion log has stopped me in my tracks, fusion log has led to CONfusion! ;0)

Hopefully I supplied enough info for some wise expert to clue me in on what I'm missing.


I'm not sure if an answer is appropriate or an additional comment, please excuse me if I have chosen incorrectly. ;0)

The good news is that after a reboot (power loss actually) the problem went away. I don't know how or why this solved it, I was very meticulous in my researching the problem but sure enough a reboot made it go away!

Thanks to JeffN825 for sticking with it and offering assistance, I voted up some of your comments.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜