5
我已经hibernate.cfg.xml文件包括在我的WCF服务库NHibernate的 - 无法找到hibernate.cfg.xml文件
BuildAction = Content and Copy to output directory = Copy Always
然而,当我运行应用程序它抛出以下错误:
Could not find file 'C:\Program Files (x86)\DevExpress 2010.2\IDETools\System\CodeRush\Bin\PlugIns\hibernate.cfg.xml'
我不知道为什么它在上面的路径而不是运行时bin目录寻找hibernate.cfg.xml。
供参考:我最近安装了DevExpress v10.2以用于其他应用程序。
任何想法?
感谢Rippo,设置Environment.CurrentDirectory = System.AppDomain.CurrentDomain.Ba seDirectory;解决了我的问题。但是我仍然无法理解为什么运行时将DevExpress作为当前目录。 – iniki 2011-02-01 10:21:14