所以我根据需要转换我的映射文件(进行更改时,转换为映射)。像这样配置 NHibernate 时的任何:
Assembly asm = Assembly.Load("RPMWare.Core.DataAccess");
//NHibernate configuration: see hibernate.cfg.xml
var cfg = new Configuration();
cfg.AddMappingsFromAssembly(asm);
cfg.Configure();
并运行我的网络应用程序,我得到以下异常:
Could not load file or assembly 'NHibernate, Version=2.0.0.4000,
Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
但是,我所有的集成测试都按预期工作。有任何想法吗?