sqlite.net PCL throws TypeInitalizationException sqlite.net PCL throws TypeInitalizationException sqlite sqlite

sqlite.net PCL throws TypeInitalizationException


I had the same problem in a tests project.Solved it by adding the package http://www.nuget.org/packages/System.Data.SQLite.Core for the SQLitePlatformWin32.

Although not listed as a dependency in the actual version, it was in previous one of the platform's nuget package (http://www.nuget.org/packages/SQLite.Net.Platform.Win32/)

Additionally: in case of using SQLitePlatformGeneric a copy of sqlite3.dll should be placed in the output directory.