我刚开始使用NHibernate,并且我正在使用快速入门指南,但我一直收到此错误。我已经完全按照快速入门指南所说的方式完成了所有操作,并且每次都收到此错误。
<error>
{"The type initializer for 'NHibernate.Cfg.Configuration' threw an exception."}
</error>错误出现在下面这一行:
Configuration nhConfig = new Configuration();内部异常是:
<Inner Exception>
{"The type initializer for 'log4net.spi.LoggerManager' threw an exception."}
</Inner Exception>和内部异常的堆栈跟踪:
<Stack Trace>
" at log4net.spi.LoggerManager.GetLogger(Assembly domainAssembly, String name)\r\n at log4net.LogManager.GetLogger(Assembly domainAssembly, String name)\r\n at log4net.LogManager.GetLogger(Type type)\r\n at NHibernate.Cfg.Configuration..cctor()"
</Stack Trace>发布于 2013-07-09 15:04:00
“这看起来几乎像是一个log4net异常。Log4net也不应该在其程序集之外引发任何异常。”
https://stackoverflow.com/questions/17541986
复制相似问题