[Mono-bugs] [Bug 35539][Nor] New - Mono compiler generates DLL which causes exception on Windows .NET

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
12 Dec 2002 21:12:21 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by wdowns@iglooware.com.

http://bugzilla.ximian.com/show_bug.cgi?id=35539

--- shadow/35539	Thu Dec 12 16:12:20 2002
+++ shadow/35539.tmp.4733	Thu Dec 12 16:12:21 2002
@@ -0,0 +1,72 @@
+Bug#: 35539
+Product: Mono/MCS
+Version: unspecified
+OS: Mandrake 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: wdowns@iglooware.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Mono compiler generates DLL which causes exception on Windows .NET
+
+Please fill in this template when reporting a bug, unless you know what you are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Given the source (below), compile server.cs and client.cs on both mono and .NET:
+
+-------------- server.cs --------------
+public class Sum { public static int mSum(int x,int y) { return x+y; } }
+-------------- client.cs --------------
+using System;
+class Client { public static void Main() { Console.WriteLine(Sum.mSum(3,5)); } }
+-------------- Makefile --------------
+all: server.dll client.exe
+server.dll: server.cs
+        mcs /t:library /out:server.dll server.cs
+client.exe: client.cs
+        mcs /r:server.dll client.cs
+-------------- build.bat --------------
+csc /t:library /out:server.dll server.cs
+csc /r:server.dll client.cs
+------------- END SOURCES -------------
+
+2. Run the .NET-produced client.exe, with server.dll in same directory, on mono, and on .NET
+3. Run the mono produced client.exe, with server.dll in same directory, on mono, and on .NET
+
+Actual Results:
+
+.NET can't run the binaries compiled solely on mono, or the .NET compiled client.exe with the mono-compiled server.dll.  Both cases fail with:
+
+Unhandled Exception: System.IO.FileLoadException: Unable to load file 'server'.
+File name: "server"
+   at Client.Main()
+
+Expected Results:
+
+Mono and .NET compiled binaries should run on both Mono and .NET
+
+How often does this happen? 
+
+Every time.
+
+Additional Information:
+
+I am running Mono on Mandrake 9.0 (it worked with both .NET and mono produced executables), and .NET on Windows 2000 Professional (using the .NET framework included in Visual Studio .NET latest MSDN version).
+
+I have used monodis to produce the MSIL for both client.exe and server.dll, but haven't been able to discern any substantive difference between the two, except for the apparently extraneous code produced by .NET for server.dll, within mSum:
+
+        IL_0003: stloc.0
+        IL_0004: br.s IL_0006
+
+        IL_0006: ldloc.0
+
+Does anyone have a tool which will get at additional meta-data stored within a .DLL, that could help determine the important difference between the .NET produced and mono produced server.dll?