This may be in the documentation somewhere, but I certainly missed it and cannot find it. I thought I’d make a little post about it, so that I’d remember it, and maybe help someone else who missed it in the documentation too.

Remember to set the Build Action property on all *.hbm.xml files to “Embedded Resource”. The NHibernate config file looks for these files as Embedded resources and will not pick it up if it is left at the default “Content” property.

Hope this helps someone.

~Lee

posted on Monday, July 28, 2008 1:16 PM |

Comments

Gravatar
# re: Lil’ NHibernate Tip
Posted by Robz
on 7/28/2008 10:12 PM
Very nice tip! The only time you wouldn't want to do that is if you are actually going to use the files in a directory instead of pointing to the Assembly to build your NHibernate Configuration. The files option is nice because you can change your NHibernate settings without having to redeploy (not saying you will).
Gravatar
# re: Lil’ NHibernate Tip
Posted by Lee Brandt
on 7/29/2008 8:34 AM
Thanks for the comment. I was wondering if there was a way to leave them able to be modified without having to redeploy. I am a total NHibernate n00b, so thanks for the heads up!

~Lee
Gravatar
# re: Lil’ NHibernate Tip
Posted by Robz
on 8/4/2008 11:16 PM
I'm a n00b too! Less than 6 months with NHib. I usually come into using products with a very advanced question.

The documentation (reference) is awesome! It is one of the few PDFs I keep close to me. http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/pdf/nhibernate_reference.pdf
From http://www.hibernate.org/5.html#A26
Post Comment
Title *
Name *
Email
Url
Comment *  
Please add 8 and 3 and type the answer here: