A taste of development

May 29, 2008

Specifying the Citing Assembly

Filed under: Technology —Tagged , , — simma1990 @ 12:46 pm

Suppose you’re debugging your application and you realise that version 1.0 of an assembly is being charged when you intended it should be version 2.0. Where is the reference to 1.0 coming from?

The well-fixedest way to regain out is to view the Fusion log for this bind. If the version 1.0 assembly was successfully charged, utilize the ForceLog/”Log all binds” option of FusLogVw. And then, seek the line in the log demonstrating the addressing assembly:

Addressing assembly : referencingAssembly, Version=1.0.0.0, Culture=achromatic, PublicKeyToken=12ab3bf24c56c45b.

It exhibits the display name of the addressing assembly when uncommitted. It doesn’t assure you whether this is a unchanging or a dynamical reference because Fusion doesn’t cognize or care (that doesn’t matter for obliging purposes). So, this could intend that referencingAssembly was built against the other 1.0 assembly, or that it invited it at runtime via Assembly.Load(), etc.

Sometimes the naming assembly is not specified in the log. There are a few potential cases where that bechances:

  • The assembly was requested by unmanaged code (interop).
  • The calling off assembly was in another appdomain (AppDomain.CreateInstance(), etc.).
  • The calling off assembly had not been loaded through Fusion (Assembly.Load(byte[]), Assembly.LoadFile(), etc.).

 

Comments are closed.

Powered by WordPress Hosted by Edublogs.