NHibernate.MappingException'无法编译映射文件:OrmEx.Customer.hbm.xml

NHibernate.MappingException'Could not compile the mapping document: OrmEx.Customer.hbm.xml

我对 Nhibernate 映射有疑问。你能帮帮我吗?

那是我的 Customer.hbm.xml 在此处输入代码:

然后就是 App Config

我使用 sqlserver 2012 和 NHibernate 5.0.0

您的映射文件的命名空间与您的 class 不同,我想 QuickStart 程序集不存在:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
              assembly="OrmEx"
              namespace="OrmEx">