[Mono-bugs] [Bug 43291][Maj] New - Program compiled against System.Windows.Forms fails to execute under Windows XP
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 19 May 2003 06:05:07 -0400 (EDT)
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 4lw0e0402@sneakemail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=43291
--- shadow/43291 Mon May 19 06:05:07 2003
+++ shadow/43291.tmp.32537 Mon May 19 06:05:07 2003
@@ -0,0 +1,127 @@
+Bug#: 43291
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: Compile on RedHat 8.0, attempt to run on Windows XP w/ .NET 1.0 and 1.1
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: 4lw0e0402@sneakemail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Program compiled against System.Windows.Forms fails to execute under Windows XP
+
+#######################
+Description of Problem:
+#######################
+A simple test application was made using System.Windows.Forms. The
+following is its source code:
+
+---8<---
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+class Test : Form
+{
+ Test()
+ {
+ Button test = new Button();
+ test.Text = "click me";
+ test.Size = new Size(100, 25);
+ test.Location = new Point(15, 20);
+ Controls.Add(test);
+ }
+
+ static void Main()
+ {
+ Application.Run(new Test());
+ }
+}
+---8<---
+
+This program was compiled first with CSC and runs fine under Windows.
+However, when the program is compiled with MCS, it does not run under
+Windows. The file is compiled with the following command-line:
+
+ mcs -r:System.Windows.Forms.dll -r:System.Drawing.dll Test.cs
+
+..and it compiles succesfully, but generates the following error when run
+under Windows with the .NET runtime:
+
+---8<---
+Unhandled Exception: System.IO.FileNotFoundException: File or assembly
+name Syst
+em.Windows.Forms, or one of its dependencies, was not found.
+File name: "System.Windows.Forms"
+
+Fusion log follows:
+=== Pre-bind state information ===
+LOG: DisplayName = System.Windows.Forms, Version=1.0.0.0, Culture=neutral,
+PublicKeyToken=null
+ (Fully-specified)
+LOG: Appbase = X:\
+LOG: Initial PrivatePath = NULL
+Calling assembly : Test, Version=0.0.0.0, Culture=neutral,
+PublicKeyToken=null.
+===
+
+LOG: Application configuration file does not exist.
+LOG: Policy not being applied to reference at this time (private, custom,
+partial, or location-based assembly bind).
+LOG: Post-policy reference: System.Windows.Forms, Version=1.0.0.0,
+Culture=neutral, PublicKeyToken=null
+LOG: Attempting download of new URL file:///X:/System.Windows.Forms.DLL.
+LOG: Attempting download of new URL
+file:///X:/System.Windows.Forms/System.Windows.Forms.DLL.
+LOG: Attempting download of new URL file:///X:/System.Windows.Forms.EXE.
+LOG: Attempting download of new URL
+file:///X:/System.Windows.Forms/System.Windows.Forms.EXE.
+---8<---
+
+###############################
+Steps to reproduce the problem:
+###############################
+1. Compile the source code above with the Mono C# compiler MCS.
+2. Attempt to execute the resulting EXE file on a Windows machine with
+the .NET runtime. I tested Windows XP with .NET 1.0 and .NET 1.1, and
+Windows 2000 with only .NET 1.0 and got the same results.
+
+#######################
+Additional Information:
+#######################
+If the binary is placed into the directory containing
+System.Windows.Forms.dll (on my system,
+X:\Windows\Microsoft.NET\Framework\v1.0.3705\), then it generates a
+different error:
+
+Unhandled Exception: System.IO.FileLoadException: The located assembly's
+manifest definition with name 'System.Windows.Forms' does not match the
+assembly reference.
+File name: "System.Windows.Forms"
+
+Fusion log follows:
+=== Pre-bind state information ===
+LOG: DisplayName = System.Windows.Forms, Version=1.0.0.0, Culture=neutral,
+PublicKeyToken=null
+ (Fully-specified)
+LOG: Appbase = X:\WINDOWS\MICROSOFT.NET\FRAMEWORK\V1.0.3705\
+LOG: Initial PrivatePath = NULL
+Calling assembly : Test, Version=0.0.0.0, Culture=neutral,
+PublicKeyToken=null.
+===
+
+LOG: Application configuration file does not exist.
+LOG: Policy not being applied to reference at this time (private, custom,
+partial, or location-based assembly bind).
+LOG: Post-policy reference: System.Windows.Forms, Version=1.0.0.0,
+Culture=neutral, PublicKeyToken=null
+LOG: Attempting download of new URL
+file:///X:/WINDOWS/MICROSOFT.NET/FRAMEWORK/V1.0.3705/System.Windows.Forms.D
+LL.
+WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN