Unable to compile simple C# file with mono's dmcs

637 Views Asked by At

I'm trying to use dmcs to compile a simple C# source file. This is the source file:

using System;

class MainClass
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello World");
    }
}

I try to compile it with dmcs MainFile.cs, but I the the error:

Could not load signature of Mono.CSharp.Driver:Create due to:

Unhandled Exception: System.TypeLoadException: A type load exception has occurred. [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: A type load exception has occurred.

I can compile it just fine with gmcs, but I want dmcs to get C#4 features.

Does anyone know how to solve that problem?

I'm running mono 2.10.5 on Ubuntu 11.10

1

There are 1 best solutions below

0
On

Turns out that gmcs also supports C#4.0, so it doesn't really matter...