Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8608735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:41:35+00:00 2026-06-12T03:41:35+00:00

I have an error with a MySql database console app that must run on

  • 0

I have an error with a MySql database console app that must run on mono. On microsoft’s .NET it is running flawlessly but on Mono 2.11.4 it just won’t work.

I have already tried setting most of the “Copy Local” settings of the reference to “true”, but to no avail.

At the beginning of the application I immediately get the following exception:

Unhandled Exception:

System.TypeInitializationException: An exception was thrown by the type initializer for System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions ---> System.InvalidProgramException: Invalid IL c
ode in System.Data.Metadata.Edm.PrimitiveType:GetEdmPrimitiveTypes (): method body is empty.

  at System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Data.Entity.Internal.DbSetDiscoveryService.GetSets () [0x00000] in <filename unknown>:0
  at System.Data.Entity.Internal.DbSetDiscoveryService.InitializeSets () [0x00000] in <filename unknown>:0
  at System.Data.Entity.DbContext.DiscoverAndInitializeSets () [0x00000] in <filename unknown>:0
  at System.Data.Entity.DbContext.InitializeLazyInternalContext (IInternalConnection internalConnection, System.Data.Entity.Infrastructure.DbCompiledModel model) [0x00000] in <filename unknown>:0
  at System.Data.Entity.DbContext..ctor (System.String nameOrConnectionString) [0x00000] in <filename unknown>:0
  at oldforum2vanille.NewForum.vforumEntities1..ctor () [0x00000] in <filename unknown>:0
  at oldforum2vanille.Program.ConvertDiscissionTopics (Int32 newforumid, System.String forumtitle) [0x00000] in <filename unknown>:0
  at oldforum2vanille.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions ---> System.In
validProgramException: Invalid IL code in System.Data.Metadata.Edm.PrimitiveType:GetEdmPrimitiveTypes (): method body is empty.

  at System.Data.Entity.ModelConfiguration.Utilities.TypeExtensions..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Data.Entity.Internal.DbSetDiscoveryService.GetSets () [0x00000] in <filename unknown>:0
  at System.Data.Entity.Internal.DbSetDiscoveryService.InitializeSets () [0x00000] in <filename unknown>:0
  at System.Data.Entity.DbContext.DiscoverAndInitializeSets () [0x00000] in <filename unknown>:0
  at System.Data.Entity.DbContext.InitializeLazyInternalContext (IInternalConnection internalConnection, System.Data.Entity.Infrastructure.DbCompiledModel model) [0x00000] in <filename unknown>:0
  at System.Data.Entity.DbContext..ctor (System.String nameOrConnectionString) [0x00000] in <filename unknown>:0
  at oldforum2vanille.NewForum.vforumEntities1..ctor () [0x00000] in <filename unknown>:0
  at oldforum2vanille.Program.ConvertDiscissionTopics (Int32 newforumid, System.String forumtitle) [0x00000] in <filename unknown>:0
  at oldforum2vanille.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

I have already tried a proposed solution at http://alpascual.com/post/2011/05/27/Error-Unable-to-find-the-requested-Net-Framework-Data-Provider-It-may-not-be-installed.aspx (because his error message is roughly equal) so I added these lines to my app.config

<system.data>
    <DbProviderFactories>
      <remove invariant="MySql.Data" />
      <add name="ADO.Net driver for MySQL" invariant="MySql.Data" description="ADO.Net driver for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data.MySqlClient, Version=6.6.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </DbProviderFactories>
</system.data>

After some fiddling with the configuration, the Entity Framework now again uses the MySql because of these lines, but Mono just skips this configuration and gives the above Unhandled Exception again. 🙁

Any of you have an idea? Am I forgetting something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:41:36+00:00Added an answer on June 12, 2026 at 3:41 am

    This is not scenario supported by Mono. You are not supposed to run Microsoft implementation specific runtime libraries like System.Data.Entity.dll with Mono.

    Entity Framework has been open sourced recently (version 6.0) and it’s bundled with the latest Mono version. Mono does not support earlier versions of Entity Framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying connect me to database MySQL server but the console show me ERROR
Let's say that I have an error in a php/mysql query : $query =
I have created a java SE application that uses the mysql database using mysql
I have a php file that I reads my MySQL database and returns a
I am getting an Error in MySQL: You have an error in your SQL
Error is: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual
I have the following Codeigniter (MySQL related) error in my application Error Number: 1100
I have the following error message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on
I have a mysql stored procedure which is giving me the following error:- #1064
What happens in mysql multiple records insert during an error. I have a table:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.