-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: NHibernate / visual studio 2005 express edition
PostPosted: Wed Aug 15, 2007 7:11 am 
Newbie

Joined: Wed Aug 15, 2007 5:31 am
Posts: 1
Hi everybody;

I'm using Nhibernate with visual studio 2005 express edition as an IDE. Nhibernate could not find the hbm files as i didn't manage to embed them in the assembly.

All the posts in the intrent propose the use of the embed resource property of the file witch unfortunately i don't have in my IDE.

Thanks in advance for your response please help me it's an emergency.
If it's possible be exhaustive in your answers and many thanks.

NB : I'm not considering ordering the pro version :) so one solution already eliminated !!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 12:25 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
A couple of thoughts:

I'm not experienced with .NET 2.0, but it might be that there are options for embedding files from the command line compiler that aren't available in the IDE. Not very convenient, but the option may still be there.

If not, you still have lots of options within NH. The recommended method is adding all the mappings in an assembly using AddAssembly(), but NHibernate.Cfg.Configuration has about 10 other methods for loading hbm.xml from streams or files. Check out AddFile() and AddDirectory(), they should be able to help you if you can't embed a resource.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 17, 2007 2:41 am 
Regular
Regular

Joined: Thu Nov 23, 2006 10:29 am
Posts: 106
Location: Belgium
Hello,

Although I'm not familiar with VS Express, I would be very, very surprised if you wouldn't be able to embed resource files in your application.

Please check it once again:
- select your hibernate mapping file in the solution explorer
- go to the properties
- open the combo of the property Build Action -> you should see here the option "Embedded resource". That's the one you need.

_________________
Please rate this post if it helped.

X.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.