Castle.Facilities.NHibernate和FluentNHibernate v2.x

时间:2016-04-06 14:25:20

标签: c# nhibernate fluent-nhibernate castle-windsor

我使用的是使用NHibernate 3.1和FluentNHibernate 1.2构建的https://github.com/haf/Castle.Facilities.NHibernate。我已经通过我的域中的NuGet升级到NHibernate 4.x和FluentHibernate 2.x.所以我有这些项目参考:

...
Castle.Facilities.NHibernate v0.7
--> Depends on FLuentNHibernate v1.2
--> Depends on NHibernate v3.1
NHibernate v4.0
FluentNHibernate v2.0
...

升级NHibernate和FluentNHibernate时我已将这些添加到我的app.config中:

      <dependentAssembly>
    <assemblyIdentity name="FluentNHibernate" publicKeyToken="8aa435e3cb308880" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-2.0.3.0" newVersion="2.0.3.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" />
  </dependentAssembly>

Castle Facility然后正确使用更新的NHibernate版本。但是,它拒绝使用正确的FluentNHibernate版本,并出现以下错误:

Severity    Code    Description Project File    Line    Suppression State
Error   CS0012  The type 'FluentConfiguration' is defined in an assembly that is not referenced. You must add a reference to assembly 'FluentNHibernate, Version=1.3.0.733, Culture=neutral, PublicKeyToken=8aa435e3cb308880'.  Hl7ic.Domain    ..\FluentInstaller.cs   11  Active

我已经在FLUEntNHibernate页面上读到它们不支持强名称。我想知道这是否有影响,我需要重新编译上面的一个库,或者我是否遗漏了其他的东西?

1 个答案:

答案 0 :(得分:0)

使用更新重建最新的master并解决这些问题,以构建fork自述文件中提到的问题。 https://github.com/haf/Castle.Facilities.NHibernate/pull/27