-->
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.  [ 2 posts ] 
Author Message
 Post subject: System.IO.FileNotFoundException
PostPosted: Tue Feb 05, 2008 1:12 pm 
Newbie

Joined: Tue Aug 28, 2007 2:22 pm
Posts: 7
Hola

Tengo un error en la línea:
cfg.Configure("hibernate.cfg.xml");

problem parsing configuration: System.IO.FileNotFoundException: Could not find file 'C:\Documents and Settings\...\hibernate.cfg.xml'.
at...

El archivo hibernate.cfg.xml tiene configurado Build Action como Embedded Resource. Leí que el archivo se copia en la dll de la aplicación, pero no sé cómo comprobarlo.

He buscado mucho pero no he encontrado cómo arreglar el error.

Muchas gracias por su ayuda.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 05, 2008 3:41 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
Hello gesanche,

If you have an NHibernate configuration file as an EmbeddedResource in a DLL, then you should load it with

Code:
cfg.Configure(assembly, resourceName)


Note that you will have to obtain the assembly first by loading it.

Traducción:

Hola gesanche,

Si usted tiene un archivo de la configuración de NHibernate como EmbeddedResource en un DLL, entonces usted debe cargarlo con

Code:
cfg.Configure(assembly, nombreDelRecurso)


Observe que usted tendrá que obtener a la asamblea primero cargándola.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.