[Mono-dev] Can compile but not run simple program with "dynamic x = 100"
John Feminella
johnf at bitsbuilder.com
Sun Feb 20 17:25:07 EST 2011
I built Mono 2.10 from source into /opt/mono. All appears to be well,
but I can't actually run anything:
==== begin snippet ====
[/tmp]> dmcs -r:System foo.cs && ./foo.exe
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v1.1.4322
** (./foo.exe:12205): WARNING **: The following assembly referenced
from /tmp/foo.exe could not be loaded:
Assembly: System.Core (assemblyref_index=2)
Version: 4.0.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed
in the MONO_PATH environment variable, or in the location of the
executing assembly (/tmp/).
==== end snippet ====
As nearly as I can tell, the assembly *is* in the GAC:
==== begin snippet ====
[~]> gacutil -l | grep 'System.Core'
System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
==== end snippet ====
Any hints on what I'm doing wrong?
==== begin snippet ====
[/tmp]> cat foo.cs
using System;
public class Program {
public static void Main(String[] args) {
dynamic a = 100;
Console.WriteLine("hello, world!");
Console.WriteLine("value of a is {0}", a);
}
}
==== end snippet ====
--
John Feminella
Principal Consultant, BitsBuilder
LI: http://www.linkedin.com/in/johnxf
SO: http://stackoverflow.com/users/75170/
More information about the Mono-devel-list
mailing list