Saturday, October 23, 2010

NHibernate hbm.xml file troubleshooting

If you received this kind of error while running your NHibernate program even though you already have the proxyfactory.factory_class in your app.config...


Unhandled Exception: NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException: The ProxyFactoryFactory was not configured.
Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers.
Example:
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>


..., change your filenameHere.hbm.xml's Build action property from Nothing to Embed as resource

No comments:

Post a Comment