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

    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿