title: sqlite.net PCL throws TypeInitalizationException
body: <p>We changed from sqlite-net to sqlite.net PCL edition. Our project worked fine with the old one - with the PCL edition, we now have to explicitely declare our platform by using.</p>
  <pre><code>var conn = new SQLiteConnection(new SQLitePlatformWin32(),  Path.Combine(folderPath, dbName));
  </code></pre>
  <p>But now, when I call this line, we get a</p>
  <blockquote>
  <p>A first chance exception of type 'System.TypeInitializationException' occurred in SQLite.Net.Platform.Win32.dll</p>
  <p>Additional information: The type initializer for  &quot;SQLite.Net.Platform.Win32.SQLiteApiWin32Internal&quot; threw an exception.</p>
  </blockquote>
  <p>The inner Exception tells us</p>
  <blockquote>
  <p>{&quot;Failed to load native sqlite library&quot;}</p>
  </blockquote>
  <p>Stacktrace:</p>
  <blockquote>
  <p>at SQLite.Net.Platform.Win32.SQLiteApiWin32Internal.sqlite3_open_v2(Byte[] filename, IntPtr&amp; db, Int32 flags, IntPtr zvfs)</p>
  <p>at SQLite.Net.Platform.Win32.SQLiteApiWin32.Open(Byte[] filename, IDbHandle&amp; db, Int32 flags, IntPtr zvfs)</p>
  <p>at SQLite.Net.SQLiteConnection..ctor(ISQLitePlatform sqlitePlatform, String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks, IBlobSerializer serializer, IDictionary<code>2 tableMappings, IDictionary</code>2 extraTypeMappings, IContractResolver resolver)</p>
  <p>at SQLite.Net.SQLiteConnection..ctor(ISQLitePlatform sqlitePlatform, String databasePath, Boolean storeDateTimeAsTicks, IBlobSerializer serializer, IDictionary<code>2 tableMappings, IDictionary</code>2 extraTypeMappings, IContractResolver resolver)</p>
  </blockquote>
  <p>However the sqlite3.dll is in the application folder and it actually did work with the unforked version. I played around with compiling for x86 and x64 and downloaded the latest sqlite3.dll for Win32 but all without success. What are we missing?</p>