DMS 9.0 sync throws The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
See original GitHub issueWas using DMS 0.8.1-beta-0687. Only change is upgrade client and web api to DMS 0.9.0. Also upgraded Microsoft.Data.Sqlite 5.0.8 to 6.0.0 as required by DMS
Stack trace
at Dotmim.Sync.SyncAgent.<>c__DisplayClass53_0.<<SynchronizeAsync>b__0>d.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dotmim.Sync.SyncAgent.<SynchronizeAsync>d__53.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Wbl.Services.DataService.<SyncAsync>d__46.MoveNext() in C:\Repos\FREE\Wbl\Services\DataService.cs:line 410
Inner exception stack trace
at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)
at Dotmim.Sync.Sqlite.SqliteSyncProvider.CreateConnection()
at Dotmim.Sync.BaseOrchestrator.<RunInTransactionAsync>d__67`1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Dotmim.Sync.SyncAgent.<>c__DisplayClass53_0.<<SynchronizeAsync>b__0>d.MoveNext()
Rolled back to DMS 0.8.1-beta-0687 and all is tickety-boo
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
The type initializer for 'SQLite.SQLiteConnection' threw an ...
I cannot get passed the following starting code without getting the subsequent errors: var db = new SQLiteConnection (dbPath);. Error: The type ......
Read more >Microsoft.Data.Sqlite.SqliteConnection throws a System. ...
Running an application with Sqlite DB connection throws the following exception: System.TypeInitializationException: The type initializer ...
Read more >System.TypeInitializationException in Microsoft.Data.Sqlite. ...
TypeInitializationException thrown by Microsoft.Data.Sqlite. ... (orig) /Type initialization for Microsoft.Data.Sqlite.SqliteConnection threw an Exception".
Read more >System.ArgumentNullException: Value cannot be null in ...
TypeInitializationException : A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
Read more >VS2019 the type initializer for 'sqlite.sqliteconnection' threw ...
The application when built from VS2017 run fine. The same solution built on VS2019 throws an exception when accessing Sqlite. the type ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This should be fixed in version 6.0.1 of Microsoft.Data.Sqlite (due any day now)
@Mimetis No, I was wrong.
0.9.1works good in case keeping project Sqlite version 5.0.3. Thanks for quick fix