[MonoDevelop] monodevelop not finding System.Xml

Rafael Teixeira monoman at gmail.com
Mon Jun 19 16:25:25 EDT 2006


Did you add a reference in the project to the System.Xml assembly (not
to be mistaken with the System.Xml namespace that is mostly
implemented in it)?
AFAIK MD  when compiling instructs mcs not to use the default
libraries but only the ones the project explicitly references. That's
is so that you don't carry unwanted "luggage" in the project, and also
can specifically target a version (profile) of .NET.

Do "mcs --help" at the prompt and lookout for -noconfig and -nostdlib
options, to understand things a bit more.

Hope it helps,

On 6/19/06, William Huskey <william.huskey at gmail.com> wrote:
> most likely a simple bug but I have no clue where to start.
>
> if I try to use System.Xml  monodevelop tells me
>
> [Task:File=/home/huskeyw/Projects/testxml/testxml/Main.cs,
> Line=3, Column=1, Type=Error, Description=The type or namespace name
> `System.Xml' could not be found. Are you missing a using directive or an
> assembly reference?(CS0246)
>
>
> but If I take the same project and use mcs , the file compiles.. so I know
> the .dll are there (plus I did a search and foudn them in the mono folder
> where they should be)
>
> mcs version is
> Mono C# compiler version 1.1.13.6
>
> monodevelop is 0.10
> and I am running Gentoo  2.6.16-gentoo-r9 #4 SMP PREEMPT Wed Jun 14 01:08:18
> EDT 2006 i686 Intel(R) Pentium(R) M processor 1.80GHz GNU/Linux
>
>
>  Thanks..
>
> here is the base program... may have other errors but.. untill it finds the
> class that is hard for me to tell..
>
>
> using System;
> using System.Xml;
>
> namespace ReadXMLfromFile
> {
>     /// <summary>
>     /// Summary description for Class1.
>     /// </summary>
>     class Class1
>     {
>         static void Main(string[] args)
>         {
>             XmlTextReader reader = new XmlTextReader ("books.xml ");
>             while (reader.Read())
>             {
>                 switch (reader.NodeType)
>                 {
>                     case XmlNodeType.Element: // The node is an element.
>                         Console.Write("<" + reader.Name);
>                         Console.WriteLine(">");
>                         break;
>                     case XmlNodeType.Text: //Display the text in each
> element.
>                         Console.WriteLine (reader.Value);
>                         break;
>                     case XmlNodeType.EndElement: //Display the end of the
> element.
>                         Console.Write ("</" + reader.Name);
>                         Console.WriteLine(">");
>                         break;
>                 }
>             }
>             Console.ReadLine();
>         }
>      }
> }
>
> --
> William S. Huskey
>
> UNIX Systems Engineer
>
> Maritime Systems Solutions Division
>
> SAIC
>
> Tel: 425-267-5643
>
> Email: huskeyw at saic.com
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw


More information about the Monodevelop-list mailing list