Bug 10793 - Unhandled Exception: System.TypeLoadException: Inheritance security rules violated by type:
Summary: Unhandled Exception: System.TypeLoadException: Inheritance security rules vio...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Mono.Data.Sqlite ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-02-28 22:59 UTC by Warren Music
Modified: 2013-03-12 14:49 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 10793 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Warren Music 2013-02-28 22:59:09 UTC
Unhandled Exception: System.TypeLoadException: Inheritance security rules violated by type: 'Mono.Data.Sqlite.SqliteConnectionHandle'. 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()
Comment 1 Jon 2013-03-12 11:48:01 UTC
I'm getting this same error.  I'm using Mono 2.10.9 on Windows 7.

To reproduce:
-------------------------------------------
using System;            // version 4.0
using Mono.Data.Sqlite;  // version 4.0

public class CreateSQLiteDatabase
{
    static void Main() 
    {
        //connection string from example in http://www.mono-project.com/SQLite
        string cs = "URI=file:SqliteTest.db,version=3"; 
        SqliteConnection con = new SqliteConnection(cs);

        con.Open();  //this line trigger the execution error
        con.Close();
    }
}
Comment 2 Jon 2013-03-12 14:49:31 UTC
Actually, I take it back.  This error is probably due to my inexperience with how to use Mono. 

I get the error above if I run the executable directly, i.e.,
command prompt> CreateSQListDatabase.exe

But I found if I run it with mono explicitly, I get no error, i.e.,
command prompt> mono CreateSQListDatabase.exe