This error occurs when two ore more components in the same project are using different versions of 'Castle.DynamicProxy'.
Some additional steps are required to get all parts working.
Version compatibility can be achieved by either installing both versions
of 'Castle.DynamicProxy' into the GAC or by adding an assembly redirection in the application's configuration file.

When installed in to the Global Assembly Cache, the .NET runtime can find the version
of 'Castle.DynamicProxy' needed at runtime no matter which version may be installed
in the application's directory. To do this the ' Castle.DynamicProxy.dll' assembly
must have been signed (don't know if it is).
If so it can be installed into the GAC with the simple command line utility, gacutil.
gacutil /i Castle.DynamicProxy

Another soultion, is to add an assembly redirect in the .config file of the application to tell the CLR to use the latest version of
Castle.DynamicProxy available.

To add an assembly redirect
Add  an <assemblyBinding> entry to the <runtime> section of the configuration file for each version that must be redirect.

<configuration> 
  <runtime>  
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
      <dependentAssembly>  
         <assemblyIdentity name="Castle.DynamicProxy "         publicKeyToken="......"         culture="neutral" />  
         <bindingRedirect oldVersion="W.*"        newVersion="X.Y.Z"/>  
     </dependentAssembly>  
   </assemblyBinding>  
 </runtime>
</configuration>

Reply via email to