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 9244421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:01:33+00:00 2026-06-18T09:01:33+00:00

I’ve been working on a compiler for a custom language for .NET, its currently

  • 0

I’ve been working on a compiler for a custom language for .NET, its currently using System.Reflection.Emit but when I want to run it on Mono (It runs fine on MS .NET, both 2.0 and 4.0 CLRs) I run into a bunch of exceptions when dealing with GenericTypeParameterBuilder, most specifically this one:

Unhandled Exception: System.NotSupportedException: The invoked member is not supported in a dynamic module.
at System.Reflection.Emit.TypeBuilder.check_created () [0x00012] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\corlib\System.Reflection.Emit\TypeBuilder.cs:1678 
at System.Reflection.Emit.TypeBuilder.InternalResolve () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\corlib\System.Reflection.Emit\TypeBuilder.cs:1653 
at System.Reflection.Emit.GenericTypeParameterBuilder.InternalResolve () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\corlib\System.Reflection.Emit\GenericTypeParameterBuilder.cs:93 
at System.Reflection.MonoGenericClass.InternalResolve () [0x00021] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\corlib\System.Reflection\MonoGenericClass.cs:105 
at System.Reflection.Emit.TypeBuilder.DefineDefaultConstructor (MethodAttributes attributes) [0x00030] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\corlib\System.Reflection.Emit\TypeBuilder.cs:484 
at System.Reflection.Emit.TypeBuilder.CreateType () [0x0017f] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.9\mcs\class\corlib\System.Reflection.Emit\TypeBuilder.cs:788 
at dotC.CType.CreateType () [0x00000] in <filename unknown>:0 
at dotC.Compiler.Save () [0x00000] in <filename unknown>:0 
at dotC.Compiler.Compile () [0x00000] in <filename unknown>:0 
at dotC.Dev.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Now the code that runs this is pretty involved so it is hard to copy-paste a specific piece of code, but the code structure I am trying to compile looks like this:

public class Foo<T> { }
public class Bar<T> : Foo<T> { }

And the problem happens when I am trying to compile the Bar<T> class which is supposed to inherit from Foo<T> where the generic parameter supplied to Foo is the T from bar.

So my question is: Is this a known issue in Mono SRE? Is there a way to work around this? Is it fixed in a new beta of mono or something, etc.?

  • 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-18T09:01:34+00:00Added an answer on June 18, 2026 at 9:01 am

    This certainly looks like a bug. It appears that explicitly calling DefineDefaultConstructor on the child type’s type builder prior to setting the parent type and calling CreateType will work around it, at least in the simplest case.

    EDIT

    Alternatively, explicitly defining a constructor for the child type (which potentially just calls the base constructor and returns) looks like it works even after setting the parent type, so that may be a better approach.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I want to construct a data frame in an Rcpp function, but when I
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only

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.