[Mono-list] Mono.Data.Sqlite and .NET 4.0 trouble

Winsor winsor08 at mail.ru
Thu Jun 23 09:05:31 EDT 2011


Hello all.

MS VS2010, Mono 2.10.2 precompiled binaries install. Create new Console
Application.

Code:

 string connstr = "version = 3; Data source=|DataDirectory|MainDB.db3";
 Mono.Data.Sqlite.SqliteConnection dbconn = new
Mono.Data.Sqlite.SqliteConnection(connstr);
 dbconn.Open();
 dbconn.Close();

1) Select framework version 3.5 for solution, manually copy
Mono.Data.Sqlite.dll from
"C:\Mono-2.10.2\lib\mono\gac\Mono.Data.Sqlite\2.0.0.0__0738eb9f132ed756\" in
solution dir, and sqlite3.dll copies here. Add References to copied
Mono.Data.Sqlite.dll. Build and Run - no problems.

2) Select framework version 4.0 for solution
             a) leave the assembly with the previous step
Mono.Data.Sqlite.dll  - Build and NOT! Run.
             b) manually copy Mono.Data.Sqlite.dll from
"C:\Mono-2.10.2\lib\mono\gac\Mono.Data.Sqlite\4.0.0.0__0738eb9f132ed756\" .
Replace Reference. Build and NOT! Run.


Here is the error that occurs in step 2:

The thread 'vshost.LoadReference' (0x1218) has exited with code 0 (0x0).
'MonoTest_Mono.Data.Sqlite.vshost.exe' (Managed (v4.0.30319)): Loaded
'D:\Old_Infos\Develop\work\C_Sharp\TestProjects\MonoTest_Mono.Data.Sqlite\MonoTest_Mono.Data.Sqlite\bin\Debug\MonoTest_Mono.Data.Sqlite.exe',
Symbols loaded.
'MonoTest_Mono.Data.Sqlite.vshost.exe' (Managed (v4.0.30319)): Loaded
'D:\Old_Infos\Develop\work\C_Sharp\TestProjects\MonoTest_Mono.Data.Sqlite\MonoTest_Mono.Data.Sqlite\bin\Debug\Mono.Data.Sqlite.dll'
'MonoTest_Mono.Data.Sqlite.vshost.exe' (Managed (v4.0.30319)): Loaded
'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'
A first chance exception of type 'System.ArgumentException' occurred in
Mono.Data.Sqlite.dll
A first chance exception of type 'System.TypeInitializationException'
occurred in Mono.Data.Sqlite.dll
An unhandled exception of type 'System.TypeInitializationException' occurred
in Mono.Data.Sqlite.dll

Additional information: The type initializer for
'Mono.Data.Sqlite.SqliteConvert' threw an exception.

The program '[3748] MonoTest_Mono.Data.Sqlite.vshost.exe: Program Trace' has
exited with code 0 (0x0).
The program '[3748] MonoTest_Mono.Data.Sqlite.vshost.exe: Managed
(v4.0.30319)' has exited with code 0 (0x0).


Is joint Mono.Data.Sqlite.dll with .NET 4.0????
I would be grateful for any help me in solving this problem. 

--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-Data-Sqlite-and-NET-4-0-trouble-tp3619785p3619785.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list