English 中文(简体)
NHibernate 2.1.1 references an older version of Spring
原标题:

NHibernate 2.1.0 references Spring 1.3.0.

NHibernate 2.1.1 references Spring 0.0.0.2.

Is there any special reason for that? I upgraded to NHibernate 2.1.1 and now I m getting Assembly loading errors.

最佳回答

NHibernate 2.1.2GA has been released and on the 15th of december the springteam is going to release Spring.Net 1.3GA. I updated to a nightly build (they are pretty stable right now and there is a "feature freeze") and it is already compiled against 2.1.2GA. You might want to try that too.

问题回答

You need to use an assembly redirect in your app/web.config to point to the version of Spring.NET you want to use. The version numbers will depend on the specific version you re using.

I m guessing you re going to use the proxies generated by Spring.NET instead of i.e. Castle, you ll need to pick up one of the latest builds since there s a bug in Spring.NET 1.3 and the NHibernate provider.

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Spring.Aop"
                          publicKeyToken="65e474d141e25e07"
                          culture="neutral" />

        <bindingRedirect oldVersion="0.0.0.20110"
                         newVersion="0.0.0.20310"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Spring.Core"
                          publicKeyToken="65e474d141e25e07"
                          culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.20110"
                         newVersion="0.0.0.20310"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>




相关问题
nHibernate one-to-many inserts but doesnt update

Instead of getting into code, I have a simple question. Default behavior for a simple one-to-many is that it inserts the child record then updates the foreign key column with the parent key. Has ...

How Do I copy an existing nhibernate object as a new object?

I a persisted NHibernate object that I would like to repersist as a new entity. How do I get NHibernate to save this object as if it was a new? I am thinking I might create a session interceptor to ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

NHibernate Search in a List using ICriteria

I have my class X : public class ClassX { public virtual IList<ClassY> ListY { get; set; } ... } My ClassX mapping (using Fluent) ... HasMany<ClassX>(x => x.ListY ) ....

热门标签