What happens when on a .NET 2.0 application you reference a third party
assembly that itself references the 1.0 versions of the .NET CL? (e.g.
mscorlib 1.0, System.dll 1.0, etc.).
Does the CLR automatically rebind those references to point to the 2.0
versions? I've tested this on a machine that doesn't have the 1.0 nor 1.1
versions installed and the application runs fine.
Thanks,
Juan
Mattias Sjögren - 16 Nov 2005 16:47 GMT
>Does the CLR automatically rebind those references to point to the 2.0
>versions?
Yes. Search for "assembly unification" in the docs for more details.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Juan Ignacio Gelos - 16 Nov 2005 17:32 GMT
Thanks Mattias for your answer.
Reading the docs (http://msdn2.microsoft.com/en-us/library/db7849ey ) I
see a note that states: "Version 1.0 .NET Framework assemblies are not
unified. The only way to instruct the runtime to use a .NET Framework
assembly that is not version 1.0 is to create a configuration file that
contains the appliesTo attribute in the <assemblyBinding> element.", which I
interpret to mean that assemblies compiled for .NET 1.0 do not get this
treatment. So I'm guessing the referring assembly (the one that has a
reference to an 1.0 assembly) needs to be compiled on 1.1 and up so it can
be unified?
And my main concern: supposing an assembly that has references to 1.0
.NET assemblies is unified to use the 2.0 framework assemblies, would this
hurt performance in any way? I mean runtime performance, since I expect
there's gonna be a slight performance hit at load time (I guess FUSION does
the unification).
Regards,
Juan
"Mattias Sjögren" <mattias.dont.want.spam@mvps.org> escribió en el mensaje
news:%23yn0r0s6FHA.2552@TK2MSFTNGP10.phx.gbl...
>>Does the CLR automatically rebind those references to point to the 2.0
>>versions?
>
> Yes. Search for "assembly unification" in the docs for more details.
>
> Mattias