The type initializer for ‘Nested’ threw an exception

If you get “The type initializer for ‘Nested’ threw an exception” when updating nhibernate,
then it might be related to Reference to Castle Proxy removed from NH-CORE.

Just add

<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>