LINGXIANGYANG 2015-08-26 09:27 采纳率: 64.7%
浏览 2146

在c#中试用NHibernate发现这个错误,不知怎么解决,Test.Model应该是可用的

未经处理的异常: NHibernate.MappingException: Could not compile the mapping docu
ment: Test.Model.Person.hbm.xml ---> System.InvalidOperationException: Could not
find the dialect in the configuration
在 NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props)
在 NHibernate.Cfg.Configuration.AddDeserializedMapping(HbmMapping mappingDocu
ment, String documentFileName)
--- 内部异常堆栈跟踪的结尾 ---
在 NHibernate.Cfg.Configuration.LogAndThrow(Exception exception)
在 NHibernate.Cfg.Configuration.AddDeserializedMapping(HbmMapping mappingDocu
ment, String documentFileName)
在 NHibernate.Cfg.Configuration.ProcessMappingsQueue()
在 NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String
name)
在 NHibernate.Cfg.Configuration.AddResource(String path, Assembly assembly)
在 NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
在 NHibernate.Cfg.Configuration.AddAssembly(String assemblyName)
在 Console1.Program.Main(String[] args) 位置 c:\Users\alone\documents\visual
studio 2015\Projects\Model\Console1\Program.cs:行号 14
请按任意键继续. . .
14行: Configuration config = new Configuration().AddAssembly("Test.Model");
这是什么错误?该怎么解决

  • 写回答

2条回答 默认 最新

  • threenewbee 2015-08-26 09:35
    关注

    看下是不是配置文件没找到或者有问题
    http://www.cnblogs.com/luluping/archive/2009/11/17/1604860.html

    评论

报告相同问题?

悬赏问题

  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)