-->
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: Is it possible to embed hibernte.cfg.xml into assembly?
PostPosted: Tue May 15, 2007 12:13 pm 
Regular
Regular

Joined: Tue Feb 07, 2006 4:27 pm
Posts: 69
I would like to be able to embed the configuration file into a assembly for deployment into a Web Services project.

I have the .cfg.xml file in the assembly that is aware of NHibernate which my Web Service references and the properties are set to 'copy always'. I'm noticing that the configuration file is not being copied to the web services bin folder and VS.Net 2005 does not allow me to put a post-build event to copy them.

I was going to put the xml configuration file in the WebServices project directly, but we have the ability to run locally without the WebService and with and I would then have to have multiple copies of this file on 2 locations then.

Any suggestions would be great.

Thanks

Greg


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 10:22 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
Surprised no one got this... Check out NHibernate.Cfg.Configuration.Configure( System.Reflection.Assembly, string ). Haven't used it, but it appears it will do precisely what you need.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 10:28 pm 
Regular
Regular

Joined: Tue Feb 07, 2006 4:27 pm
Posts: 69
Hey Thanks~! I'll try this...



marcal wrote:
Surprised no one got this... Check out NHibernate.Cfg.Configuration.Configure( System.Reflection.Assembly, string ). Haven't used it, but it appears it will do precisely what you need.


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.