Bug 313255 (MONO51518) - mcs does not compile System.Windows.Forms.MessageBox.Show
Summary: mcs does not compile System.Windows.Forms.MessageBox.Show
Status: RESOLVED INVALID
Alias: MONO51518
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: qa
Depends on:
Blocks:
 
Reported: 2003-11-30 21:21 UTC by Francois Genolini
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:20:41 UTC


---- Reported by fgenolini@hotmail.com 2003-11-30 14:21:37 MST ----

Description of Problem:
mcs does not compile System.Windows.Forms.MessageBox.Show()
but mono runs it if compiled with Microsoft csc.exe (with warnings)

Steps to reproduce the problem:
1. Install cygwin on Windows XP SP1
2. download and compile latest mcs and mono
3. type in attached C# source code and compile with mcs, then csc, then 
run with mono

Actual Results:
mcs fails to compile the attached c# source code:

Book.cs(17) error CS0103: The name `System.Windows.Forms.MessageBox.Show' 
could not be found in `Book'
Compilation failed: 1 error(s), 0 warnings

mono runs the code if compiled with Microsoft csc.exe, but there are 
warnings:

** (Book.exe:2944): WARNING **: Failed to load 
library .\libwinnt.dll.so.dll (libwinnt.dll.so): The specified module 
could not be found.

** (Book.exe:2944): WARNING **: Failed to load 
library .\libwinnt.dll.so.dll (libwinnt.dll.so): The specified module 
could not be found.


Expected Results:
mcs should compile anything from System.Windows.Forms.MessageBox as the 
status page of Mono says that this class is fully supported

How often does this happen? 
always

Additional Information:
I am running through the .Net c# examples in
ms-
help://MS.MSDNQTR.2003FEB.1033/cscon/html/vclrfcodereadingclassdatafromxml
filevisualc.htm

which is the MSDN Library, Visual Studio .Net 2003 | Visual Basic and 
Visual C# | Samples | Visual C# Code Example Topics | General Language 
Example Topics | Code: Reading Class Data from an XML File (Visual C#)

Here is the code from the MSDN:

public class Book
{
   public string title;

   static void Main()
   {
      Book introToVCS  = new Book();
      System.Xml.Serialization.XmlSerializer reader = new
         System.Xml.Serialization.XmlSerializer(introToVCS.GetType());

      // Read the XML file.
      System.IO.StreamReader file= 
         new System.IO.StreamReader("c:\\IntroToVCS.xml");

      // Deserialize the content of the file into a Book object.
      introToVCS = (Book) reader.Deserialize(file);
      System.Windows.Forms.MessageBox.Show(introToVCS.title,
         "Book Title");
   }
}



---- Additional Comments From fgenolini@hotmail.com 2003-11-30 14:27:04 MST ----

the workaround for me is not to use MessageBox and only output to 
console



---- Additional Comments From bmaurer@users.sf.net 2003-12-24 10:11:14 MST ----

You forgot to /r: the dll. MCS does not load SWF by default.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>cygwin under Windows XP SP1</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".