For what its worth my team recently had a very similar issue with one of our
configuration files.  We have external configuration files used by vendor
software (they require certain files).  When you set up click once
deployment you can actually change how each file is deployed.  All we had to
do to correct this issue was go to Project -> Properties -> Publish ->
Application Files and then change our configuration file to be marked as
"Include" in Publish Status from "Data File".  This then put the file in
question in the same folder as our executable.
I'm guessing the same thing would work for you and nHibernate.

On Tue, Jun 9, 2009 at 1:10 PM, joshlrogers <[email protected]> wrote:

>
> I just wanted post this so it could be found by someone later if they
> run across this problem.
>
> I use click once to deploy my app internally.  I had the
> NHibernate.cfg.xml file in the root of the primary assembly of the app
> I was deploying.  I had this set as content and copy always as far as
> properties go.  It would get deployed in click once but it was put in
> a different folder than the rest of the app for whatever reason that
> Microsoft could only justify.  During testing this worked fine because
> it was in the debug folder it only broke upon publish.
>
> I tried multiple different things including setting it to embedded
> resource but my final resolution was to modify my app.config file to
> hold the configuration rather than a seperate nhibernate config file.
> There is a sample app.config file in the /src/NHibernate.Test folder
> for your reference.  I guess in the end this is a cleaner solution
> since now I don't have a stray config file cluttering up my root, but
> it would have been nice had it worked and I hadn't had to struggle to
> figure out what was going on.
>
> Anyways, I hope this helps someone along the line
>
> BTW, the error I was getting was thus:
>
> NHibernate.Cfg.HibernateConfigException: An exception occurred during
> configuration of persistence layer. --->
> System.IO.FileNotFoundException
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to