I'm trying to use NHibernate with my project, I've generated NHibernate class and xml file using NGen. After that, I try to test my application but when I run to second line of this code.
var configuration = new Configuration();
configuration.开发者_如何学GoConfigure();
It show error message like below.
Could not find a part of the path 'D:\App\bin\Debug\hbm\MyFile.hbm.xml'.
Obviously this file doesn't exist, because it's located in D:\App\bin\Debug**\Data**\hbm\MyFile.hbm.xml
I want to know how to solving this problem?
The best solution is to set your file (MyFile.hbm.xml) as "Embedded Resource" in your Visual Studio project (Properties on File -> Build Action : Embedded Resource), and then, recompile, it'll be fine.
精彩评论