[Mono-bugs] [Bug 74098][Min] New - mcs does not automatically reference System.Drawing and System.Windows.Forms if needed

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Mar 2005 12:56:42 -0500 (EST)


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=74098

--- shadow/74098	2005-03-25 12:56:42.000000000 -0500
+++ shadow/74098.tmp.1401	2005-03-25 12:56:42.000000000 -0500
@@ -0,0 +1,62 @@
+Bug#: 74098
+Product: Mono: Compilers
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: 4lw0e0402@sneakemail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not automatically reference System.Drawing and System.Windows.Forms if needed
+
+When compiling code that makes use of classes in System.Drawing and 
+System.Windows.Forms, Microsoft's C# compiler automatically adds 
+references to System.Drawing.dll and System.Windows.Forms.dll as needed, 
+even without a -reference parameter for these assemblies. With MCS,
+-r:System.Drawing and -r:System.Windows.Forms are necessary to build code 
+which uses classes in these assemblies.
+
+Example:
+
+CSC
+===
+[x:\test\testnostdlib]type test.cs
+class MainClass
+{
+  static void Main()
+  {
+    new System.Drawing.Bitmap(10, 10, 
+System.Drawing.Imaging.PixelFormat.Format32bppRgb);
+  }
+}
+[x:\test\testnostdlib]csc test.cs
+Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
+for Microsoft (R) .NET Framework version 1.1.4322
+Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
+
+
+[x:\test\testnostdlib]
+
+MCS
+===
+susesux:/# cat test.cs
+class MainClass
+{
+  static void Main()
+  {
+    new System.Drawing.Bitmap(10, 10, 
+System.Drawing.Imaging.PixelFormat.Format32bppRgb);
+  }
+}
+susesux:/# mcs test.cs
+test.cs(5) error CS0234: The type or namespace name `Drawing' could not be 
+found in namespace `System'
+Compilation failed: 1 error(s), 0 warnings
+susesux:/#