NHibernate Envers集成与Envers错误

NHibernate Envers集成与Envers错误,nhibernate,nhibernate-envers,Nhibernate,Nhibernate Envers,未找到扩展方法 'NHibernate.Cfg.Configuration' does not contain a definition for 'IntegrateWithEnvers' and no extension method 'IntegrateWithEnvers' accepting a first argument of type 'NHibernate.Cfg.Configuration' could be found (are you missing a using dir

未找到扩展方法

'NHibernate.Cfg.Configuration' does not contain a definition for 'IntegrateWithEnvers' and no extension method 'IntegrateWithEnvers' accepting a first argument of type 'NHibernate.Cfg.Configuration' could be found (are you missing a using directive or an assembly reference?)
我在asp.net 4.5中使用NHibernate Envers 2、NHibernate 4和FluentNHibernate 1.4

我的配置是

 using CancerConnect.Domain;
 using CancerConnect.Infrastructure.Conventions;
 using FluentNHibernate.Automapping;
 using FluentNHibernate.Cfg;
 using FluentNHibernate.Cfg.Db;
 using System;


var enversConf = new NHibernate.Envers.Configuration.Fluent.FluentConfiguration();
       enversConf.Audit<Users>();

var cfg = Fluently.Configure()
             .Database(MsSqlConfiguration.MsSql2008.ConnectionString(p => p.FromConnectionStringWithKey("dbConnectionString")))
             .Mappings(m => m.AutoMappings.Add(persistenceModel))
             .ExposeConfiguration(conf => 
             {
                conf.IntegrateWithEnvers(enversConf); 
             })
            .BuildConfiguration();
使用CancerConnect.Domain;
使用CancerConnect.Infrastructure.Conventions;
使用FluentNHibernate.自动映射;
使用FluentNHibernate.Cfg;
使用FluentNHibernate.Cfg.Db;
使用制度;
var enversConf=new NHibernate.Envers.Configuration.Fluent.FluentConfiguration();
enversConf.Audit();
var cfg=fluntly.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(p=>p.fromConnectionString WithKey(“dbConnectionString”))
.Mappings(m=>m.AutoMappings.Add(persistenceModel))
.ExposeConfiguration(conf=>
{
conf.IntegrateWithEnvers(enversConf);
})
.BuildConfiguration();

我是否遗漏了任何内容扩展方法
IntegrateWithEnvers
在命名空间
NHibernate.Cfg
中定义,请参见

因此,请确保使用添加以下内容:

using NHibernate.Cfg;

您将可以访问扩展方法。

感谢您的快速响应