If you had a TypeInitializationException when you are trying to do this:
NHibernate.Cfg.Configuration conf = new NHibernate.Cfg.Configuration();
Make sure that your app.config is well formed and is coherent with the
nhibernate-configuration-2.0.xsd shema.
In my case, I had my config file ending like this:
<add key="hibernate.connection.connection_string"
value="User ID=blabla;Password=blabla;Initial Catalog=blabla;Data
Source=blabla"
/>
<add /> <-------------- Here is the mistake
</nhibernate>
</configuration>
The shema says that in the "add" node, the key and value attributtes are
mandatory. |