Hi, I'm trying to use MEF2 Preview in my .NET4 project. MEF2 Preview version is "System.ComponentModel.Composition.Codeplex" file with "System.ComponentModel.Composition, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35" assembly name.
So it only differs by revision number from the version in .NET/GAC (which is 4.0.0.0).
I checked that codeplex version is placed side by side with my exe-module. And also checked that assembly reference from exe-module is correct (to 4.0.0.1 not to 4.0.0.0).
But as I run my app CLR loads version from GAC (4.0.0.0).
I tried to add this in .config file:
<runtime>
<assemblyBinding xmlns="urn:schemas=microsoft-com:asm.v1">
<dependentAassembly>
<assemblyIdentity name="System.ComponentModel.Composition"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.0.0.1"/>
</dependentAassembly>
</assemblyBinding>
</runtime>
It doesn't help. CLR is still loading GAC version of assembly (4.0.0.0).
How to make CLR load 4.0.0.1 version which resides the executable?