2009-06-22 124 views
0

我下載了最新版本的NHibernate「2.1.0.2002」。運行最新版本的nhibernate問題

它建立了良好的,但是當我運行我的單元測試,我不斷收到錯誤: -

System.IO.FileLoadException:無法加載文件或程序集「NHibernate的,版本= 2.0.1.4000,文化=中立,PublicKeyToken = aa95f207798dfdb4'或其依賴項之一。定位的程序集清單定義與程序集引用不匹配。

它看起來像它看起來的舊版本。

這裏是鏈接

https://stackoverflow.com/questions/839112/problem-while-migrating-nhibernate-to-higher-version

這是內部錯誤我得到:

 
=== Pre-bind state information === 
LOG: DisplayName = NHibernate, Version=2.0.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4 
(Fully-specified) 
LOG: Appbase = file:///D:/Project Files/CIS3G/Webapp/_Test_DAL/bin/Debug 
LOG: Initial PrivatePath = NULL 
Calling assembly : CIS3G.DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: D:\Project Files\CIS3G\Webapp\_Test_DAL\bin\Debug\_Test_DAL.dll.config 
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. 
LOG: Post-policy reference: NHibernate, Version=2.0.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4 
LOG: Attempting download of new URL file:///D:/Project Files/CIS3G/Webapp/_Test_DAL/bin/Debug/NHibernate.DLL. 
WRN: Comparing the assembly name resulted in the mismatch: Minor Version 
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. 

回答

1

請檢查您設定的特定版本的房產在你的NHibernate參考,以「真」?它似乎並沒有被這個錯誤,但有新的NHibernate的,你需要提供一個外部ByteCodeProvider像Linfu.dll也如此。請檢查這一點。

1

我以前碰到過這個。

在我的情況下,問題是我使用UnitOfWork實現處理Nhibernate sessionFactories

我一直在使用這種LIB了一段時間,所以我剛纔複製的編譯的DLL來與NHibernate的新版本的新的測試項目,所以我得到的版本問題。

相關問題