[Mono-dev] Mono.Data.Sqlite and .Net

Vinícius Gobbo Antunes de Oliveira vgobbo at gmail.com
Sat Oct 22 13:28:29 EDT 2011

Good afternoon,

I'm working on a small command line project where Sqlite fits my needs. I'm
using Visual Studio to develop. The project must work on Mac, Windows and
Linux (and on mobile platforms, sometime in the future).
On Windows, I'm using .Net 4.0 base assemblies, but I'm also trying to
reference Mono.Data.Sqlite (4.0 profile).
So, I just added a reference to Mono.Data.Sqlite at the Mono installation
directory. This worked fine at compile time, but when I try to run the
application, it raises an exception when it tries to open the connection:

System.TypeLoadException: Inheritance security rules violated by type:
Derived types must either match the security accessibility of the base type
or be less accessible.
  at Mono.Data.Sqlite.SQLite3.Open(String strFilename, SQLiteOpenFlagsEnum
flags, Int32 maxPoolSize, Boolean usePool)
  at Mono.Data.Sqlite.SqliteConnection.Open()

I'm using Sqlite 3.7.8.

Is the way I reference the Sqlite assembly wrong?
How to solve this exception?

Thank you all.
*Vinícius Gobbo Antunes de Oliveira*
*Institute of Mathematics and Computer Sciences - ICMC*
*University of São Paulo - USP*

Cel. Phone: +55 19 8106 5188
E-mail: vgobbo at gmail.com
Skype: v.gobbo
MSN: vgobbo at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20111022/0a26f00f/attachment.html 

More information about the Mono-devel-list mailing list