NHibernate and Windsor build conflicts

I have a problem with Hibernate and Windsor to work together. My settings are as follows:

I have two projects
-DomainModel
-MVCApp

I downloaded NHibernate 2.1.2 and Windsor 2.1.1
I added the following DomainModel links from the required_Bins folder of the NHibernate download -
Antlr3, Iese, log4net and NHibernate 2.1.2.4
I also added links to the files in DomainModel for Lazy_loading, including

Castle.Core - 1.1.0.0
Castle.DynamicProxy2 - 2.1.0.0
NHibernate.ByteCode.Castle - 2.1.2.4

MVCApp has the following links:
Castle.Core - 1.2.0.6623
Castle.Microkernel - 2.1.0.6655
Castle.Windsor - 2.1.0.6655
Castle.DynamicProxy2 - 2.2.0.6628

When I start the application, I get the error message:

Could not load file or assembly "Castle.DynamicProxy2, Version = 2.1.0.0,
Assembly call: NHibernate.ByteCode.Castle, Version = 2.1. 2.4000

There is a version of Castle.DynamicProxy2 in the MVC bin folder - 2.2.0.6628, so an error after an older version was requested.

How can I make this work? What am I missing or is it wrong? Please help .. Thanks.

+3
4

NHibernate.ByteCode.Castle?

, ActiveRecord 2.1 DynamicProxy2.

, .

+3

NHibernate.ByteCode.Castle , 2.2.0.6628 Castle.DynamicProxy2. 2.1.x svn.

, . - API 2.1 2.2 Castle.DynamicProxy2.
MVCApp.

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="Castle.DynamicProxy2" publicKeyToken="407dd0808d44fbdc"/>
            <bindingRedirect oldVersion="2.1.0.0" newVersion="2.2.0.6628"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>
+2

, , " " ".NET Framework 4 Client Profile" ".NET Framework 4"

0

... NHibernate.
NHibernate, Castle Bytecode - .

, Bytecode , ( NHibernate.ByteCode.LinFu).
NHibernate Castle, Windsor, .

0

Source: https://habr.com/ru/post/1734666/


All Articles