Hibernate version: 1.20CR1
For reasons unfathomable to me, my superiors insist that we put the NHibernate configuration in our application's config file rather than in nhibernate.cfg.xml. However, our application's config file does not follow the normal name and location for app.config.
If I do this:
Code:
NHibernate.Cfg.Configuration configuration = new NHibernate.Cfg.Configuration();
configuration.Configuration(ourConfigFilePath);
I get an exeption that there is no element
Code:
<session-factory xmlns='urn:nhibernate-configuration-2.2'>
If I try to set up our config file with the format NHibernate expects in nhibernate.cfg.xml, I get exceptions about Configure() choking on other configuration sections in our file that it doesn't recognize.
How can I tell NHibernate the config file location to use, and still have it be in the app.config format?