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