[Mono-list] Unable to run mcs
David La Motta
dlamotta@email.com
Wed, 24 Sep 2003 11:09:19 -0400
This is a multi-part message in MIME format.
--------------050600020708080102060606
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I've seen a few posts about not being able to run mcs on something as
simple as a Hello World example. I also can't, with the same error
message as others:
D:\dev\c#>type Hello.cs
using System;
class Hello {
public static void Main(String[] args) {
Console.WriteLine("mono:: is alive and well...");
for (int i = 0; i < args.Length; i++)
Console.WriteLine("Argument {0} = {1}", i, args[i]);
}
}
D:\dev\c#>mcs Hello.cs
Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for System.Guid ---> Syst
em.ArgumentOutOfRangeException: Argument is out of range
in <0x001e3> 00 System.DateTime:.ctor (bool,long)
in <0x00015> 00 System.DateTime:.ctor (long)
in <0x001be> 00 System.CurrentTimeZone:GetDaylightChanges (int)
in <0x00046> 00 System.TimeZone:IsDaylightSavingTime (System.DateTime)
in <0x0001e> 00 System.CurrentTimeZone:GetUtcOffset (System.DateTime)
in <0x00078> 00 System.DateTime:.ctor (bool,long)
in <0x0003b> 00 System.DateTime:get_Now ()
in <0x0004e> 00 .GuidState:.ctor (bool)
in <0x00026> 00 System.Guid:.cctor ()
--- End of inner exception stack trace ---
in (unmanaged) 00 System.Guid:NewGuid ()
in <0x00093> 00 System.Reflection.Emit.ModuleBuilder:.ctor
(System.Reflection.Emit.AssemblyBuilder,string,string,bool,bool,bool)
in <0x00159> 00
System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
(string,string,bool,bool)
in <0x00021> 00
System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
(string,string,bool)
in <0x000d0> 00 Mono.CSharp.CodeGen:Init (string,string,bool)
in <0x006be> 00 Mono.CSharp.Driver:MainDriver (string[])
in <0x0001b> 00 Mono.CSharp.Driver:Main (string[])
The version of the compiler I am using is 0.26.42336.0 on a Win2k box.
Now on to the strange part: mcs *used* to work before I installed
Micro$oft's .NET 1.0 framework. Actually, I installed the 1.1
framework, then backed down to the 1.0 version, and now my Mono compiler
doesn't want to work anymore. Do you think the M$ installation could've
done something that is now preventing mcs from working? Like I said
before, mcs used to work before I installed any of the M$ crap.
I want to stick to the Mono stuff as much as possible (I have Mono
installed @ home on my RH9 box); somebody please throw a bone at me.
Thanks!
// David
--------------050600020708080102060606
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
I've seen a few posts about not being able to run mcs on something as
simple as a Hello World example. I also can't, with the same error
message as others:<br>
<br>
D:\dev\c#>type Hello.cs<br>
using System;<br>
<br>
class Hello {<br>
public static void Main(String[] args) {<br>
Console.WriteLine("mono:: is alive and well...");<br>
<br>
for (int i = 0; i < args.Length; i++)<br>
Console.WriteLine("Argument {0} = {1}", i, args[i]);<br>
}<br>
}<br>
<br>
D:\dev\c#>mcs Hello.cs<br>
<br>
Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for System.Guid ---> Syst<br>
em.ArgumentOutOfRangeException: Argument is out of range<br>
in <0x001e3> 00 System.DateTime:.ctor (bool,long)<br>
in <0x00015> 00 System.DateTime:.ctor (long)<br>
in <0x001be> 00 System.CurrentTimeZone:GetDaylightChanges (int)<br>
in <0x00046> 00 System.TimeZone:IsDaylightSavingTime
(System.DateTime)<br>
in <0x0001e> 00 System.CurrentTimeZone:GetUtcOffset
(System.DateTime)<br>
in <0x00078> 00 System.DateTime:.ctor (bool,long)<br>
in <0x0003b> 00 System.DateTime:get_Now ()<br>
in <0x0004e> 00 .GuidState:.ctor (bool)<br>
in <0x00026> 00 System.Guid:.cctor ()<br>
--- End of inner exception stack trace ---<br>
<br>
in (unmanaged) 00 System.Guid:NewGuid ()<br>
in <0x00093> 00 System.Reflection.Emit.ModuleBuilder:.ctor
(System.Reflection.Emit.AssemblyBuilder,string,string,bool,bool,bool)<br>
in <0x00159> 00
System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
(string,string,bool,bool)<br>
in <0x00021> 00
System.Reflection.Emit.AssemblyBuilder:DefineDynamicModule
(string,string,bool)<br>
in <0x000d0> 00 Mono.CSharp.CodeGen:Init (string,string,bool)<br>
in <0x006be> 00 Mono.CSharp.Driver:MainDriver (string[])<br>
in <0x0001b> 00 Mono.CSharp.Driver:Main (string[])<br>
<br>
The version of the compiler I am using is 0.26.42336.0 on a Win2k box.<br>
<br>
Now on to the strange part: mcs <b>used</b> to work before I installed
Micro$oft's .NET 1.0 framework. Actually, I installed the 1.1
framework, then backed down to the 1.0 version, and now my Mono
compiler doesn't want to work anymore. Do you think the M$
installation could've done something that is now preventing mcs from
working? Like I said before, mcs used to work before I installed any
of the M$ crap.<br>
<br>
I want to stick to the Mono stuff as much as possible (I have Mono
installed @ home on my RH9 box); somebody please throw a bone at me.<br>
<br>
Thanks!<br>
<br>
// David<br>
</body>
</html>
--------------050600020708080102060606--