我試圖使用從大廈System.Data.SQLite,構建與目標框架4.0
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
我能下載的源代碼來構建System.Data.SQLite在Visual Studio構建解決方案,但是當我試圖從TargetFramework = 3.5的項目中引用System.Data.SQLite.dll,我收到以下消息:
"System.Data.SQLite.dll or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project."
我注意到,他們的管理項目(System.Data。 SQLite.2010,System.Data.SQLite.Linq.2010,和System.Data.SQLite.Module.2010)都設置爲以.NET 4.0爲目標。然後,我將它們全部改爲參考3.5,重建並再次嘗試。當時我能夠引用的項目,但是我收到一個新的運行時錯誤:
"Could not oad file or assembly 'System.Data.SQLite' or one of its dependencies. This assembly is build by a runtime newer than the currently loaded runtime and cannot be loaded."
我用ILDASM打開.dll文件,並清單確實說//元數據版本:v4.0.30319這並不讓道理給我,因爲他們的文件明確指出,它應該與.NET 2.0的工作:
".We want to ship managed binaries that rely on the .NET Framework 2.0 SP2 (or for the LINQ assembly, the .NET Framework 3.5 SP1). The .NET Framework 2.0 is very widely deployed and binaries produced for it can also be referenced and used successfully from projects using the .NET Framework 4.0. "
http://system.data.sqlite.org/index.html/doc/trunk/www/build.wiki
該解決方案是怎樣的一個噩夢,有很多定製的編譯選項的目標文件,並噸。我不太確定目標框架的設置位置。我猜想有一些魔法在某處發生。
有沒有人有任何建設這個項目的經驗?任何幫助,將不勝感激。謝謝!
您使用了哪種下載解決方案?你是否試圖在3.5應用程序中使用.NET 4.0版本? –
我看到下載的唯一代碼是http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki第一個鏈接:http://system.data.sqlite.org /sqlite-netFx-source-1.0.76.0.zip我正在使用SQLite.NET.2010.sln – Adam