Internal compiler error: Could not load type NHibernate.Cfg.Configuration
I'm referencing the NHibernate dll version 2.1.2-GA, and am unable to compile under Mono 2.8.1. I've tried using NHibernate 3 instead and it compiles fine.
A simple example of the code that's failing is
NHibernate.Cfg.Configuration cfg = new NHibernate开发者_运维技巧.Cfg.Configuration();
and the error is
Error CS0584: Internal compiler error: Could not load type 'NHibernate.Cfg.Configuration' from assembly 'NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'. (CS0584)
As mentioned it compiles with no problems using NHibernate 3, does anyone have any ideas how to get it working with NHiberate 2.1.2?
I believe the issue is to do with compiling in MonoDevelop rather than a problem with NHibernate, as I could build in Visual Studio, copy the binaries to Linux and run it successfully. While I still can't compile using MonoDevelop, compiling in Visual Studio and copying the binaries across is a sufficient work around for my needs.
精彩评论