I have been reading through the documentation on side by side execution and
most articles cover how to target a version of the framework for your
application as a whole.
I have a .Net app that is built against version 2.0 of the framework. This
app is dependent on other .Net assemblies that are build against version 1.1
of the framework. When I run my application it is obviously going to be
loaded under version 2.0 of the framework, and by default the 1.1 assemblies
that are referenced will also be loaded under version 2.0 due to Assembly
Unification.
My question is when running my app is there a way in which I can get the 1.1
assemblies I reference to run under version 1.1 of the framework rather than
2.0, and thus being able to ensure that my dependencies will not be affected
by any breaking changes?
I have come across the following "unification of .NET Framework assemblies
prevents the runtime from loading assemblies from different versions of the
.NET Framework unless the runtime is specifically instructed to do so" but am
unsure of how to specifically instruct the runtime to load version 1.1
framework assemblies for any particular assembly that I depend upon.
Naveen - 09 Jan 2006 22:43 GMT
If the unification causes problems in your scenario, you can override
the unification by using the version policy statements. I don't think
this is required for the base class libraries because they are backward
compatible. If you still think it is required then you can use the
configuration file to override it.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="myAssembly"
publicKeyToken="32ab4ba45e0a69a1"
culture="neutral" />
<bindingRedirect oldVersion="2.0.0.0"
newVersion="1.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>