Geeks With Blogs
Lee Brandt's Blog You're only as smart as your last line of code

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 | Back to top


Comments on this post: Lil’ NHibernate Tip

# re: Lil’ NHibernate Tip
Requesting Gravatar...
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).
Left by Robz on Jul 28, 2008 10:12 PM

# re: Lil’ NHibernate Tip
Requesting Gravatar...
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
Left by Lee Brandt on Jul 29, 2008 8:34 AM

# re: Lil’ NHibernate Tip
Requesting Gravatar...
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
Left by Robz on Aug 04, 2008 11:16 PM

Your comment:
 (will show your gravatar)


Copyright © Lee Brandt | Powered by: GeeksWithBlogs.net