我已经在 GAC 中EmployeeEntity
存储了 inMyCompany.Entities.Employee.dll
和EmployeeMap: ClassMapping<SPListItem>
in 。MyCompany.Mapping.dll
我使用按代码映射来创建 ISessionFactory 实现,如下所示:
var config = new Configuration();
// Initialize config code omitted...
var mapper = new ModelMapper();
mapper.AddMapping(typeof(EmployeeMap));
config.AddDeserializedMapping(mapping, "ExampleMapping");
// Exception thrown here:Could not compile the mapping document: ExampleMapping
// InnerException:persistent class KT.NHibernate.Mapping.Entities.Employee, KT.Nhibernate.Mapping.Entities not found
return config.BuildSessionFactory();
我应该如何正确配置配置实例以在我的映射中使用 GAC 程序集?