0

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

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Idan Arye
  • 12,402
  • 5
  • 49
  • 68
  • sounds like you have a broken mono installation. I never had much luck with the ubuntu versions of mono. You are often best off building it yourself from the source tarballs on debian/ubuntu – IanNorton Dec 27 '11 at 23:47
  • Well, I found out it doesn't really matter, so I prefer not to start installing things without the package manager. Thanks anyways! – Idan Arye Jan 02 '12 at 08:17

1 Answers1

0

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

Idan Arye
  • 12,402
  • 5
  • 49
  • 68