views:

1121

answers:

1

I'm trying to use WindsorControllerFactory (the latest 1.0.0.916 version) together with the new Windsor Castle 2.0 (again, the latest version). But I'm getting the

Could not load file or assembly 'Castle.Windsor, Version=1.0.3.0...

error when starting the Web application. Anyway, during writing of this question I managed to persuade the Web app to bind to new Castle's dlls by adding this block to the Web.config file:

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Castle.Windsor" culture="neutral" publicKeyToken="407dd0808d44fbdc"/>
        <bindingRedirect oldVersion="1.0.3.0" newVersion="2.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Castle.Core" culture="neutral" publicKeyToken="407dd0808d44fbdc"/>
        <bindingRedirect oldVersion="1.0.3.0" newVersion="1.1.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Castle.MicroKernel" culture="neutral" publicKeyToken="407dd0808d44fbdc"/>
        <bindingRedirect oldVersion="1.0.3.0" newVersion="2.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

So I guess I answered my own question, but I wanted to share this with anybody having the same problem. Or is there a better way (apart from compiling the MVCContrib sources myself)?

A: 

I'd like to build MvcContrib myself too, and put its source along with our project code.

Tiendq