Re: Redirecting Assembly Binding



Hi Mark,

Based on my research, the fusion.dll which is component of .NET framework
will match Full Qualified Name of the strong named DLL. This is by design
inside the CLR implement so far.

As you said, the strongnamed DLL is an evidence to prove its unique
identity. But a strongly named assembly consists of four attributes that
uniquely identify the assembly: a filename(without an extension), a version
number, a culture identity and a public key token(a value derived from a
public key).
For detailed information you may refer to books.
Applied Microsoft .NET Framework Programming (Paperback)
by Jeffrey Richter

See Section"Giving an Assembly a Strong Name", Charpter 3.

The located assembly's manifest definition with name xxx.dll does not match
the assembly reference
http://blogs.msdn.com/junfeng/archive/2004/03/25/95826.aspx

So the bindingredirect element is used in this scenario to instruct the CLR
to bind to a new DLL when it request for an old one.

Also since .NET support side-by-side execution, which means that we may
have one assembly of multiple versions on the same machine.
Because .NET will probe multiple places for an assembly binding.
e.g. there is strong named assembly A has a version 1.0.0.0 in GAC, but it
also have another version 2.0.0.0 in appbase.
So when binding time, which assembly CLR should bind to? the version
1.0.0.0 or 2.0.0.0? If we ignore the version attribute, that will cause the
..NET fusion mechanism confused.

If you still have any concern, please feel free to post here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: CLR 2.0
    ... one of our older apps (CLR 1.1). ... The machine has the .NET Framework 2.0 installed and the dll ... just use the same dll across apps. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: System.Runtime.InteropServices.COMException: Error
    ... after i registered the dll on sever, ... > Is there any other setting I need to do on Win2K3 to make the old dll work> on .Net framework? ... > Exception Details: System.Runtime.InteropServices.COMException: COM object> with CLSID is either not valid or not> registered. ...
    (microsoft.public.dotnet.general)
  • Re: C++/CLI and C++ [Mixed] Class Library - project settings
    ... suppose by making the project settings not to use CLR then it looks ... like a normal dll project. ... If you had native exports, we would need the import library. ... import libraries that this project depends on (which is probably not ...
    (microsoft.public.dotnet.languages.vc)
  • RE: FileNotFoundException question
    ... Your problem has to do with the way the CLR probes for assemblies. ... that you don't have a element in your application's configuration ... LoadLibrary to load the C++ dll, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: VCL.NET revisited...
    ... Ever noticed the size of the .NET Framework directory? ... Back to DLL Hell deployment? ... Delphi apps were/are mostly single exe only and any ... DevCo spinoff: Unmanaged Delphi W32. ...
    (borland.public.delphi.non-technical)