gvtmath
gvtmath

Reputation: 13

New to Mono - help setting search path?

Running Ubuntu Oneric 11.10 with 1 GB RAM and 250 GB HDD Dell Inspiron Laptop.

I got some demo code from a tutorial to read XML. When I compile it, I get this message:

"The type or namespace name '.Xml' does not exist in the namespace 'System'. Are you missing an assembly reference?" (using System.Xml;)

I have the library in this path: /usr/lib/mono/gac/System.Xml/4.0.0.0_b77a5c561934e089/System.Xml.dll

Upvotes: 1

Views: 1044

Answers (1)

Marcelo Zabani
Marcelo Zabani

Reputation: 2279

Are you using MonoDevelop to build your application? If so, make sure that there is a reference to System.Xml in your project.
In case you are hardcore enough to "manually" use dmcs to build your application (or you are using a Makefile or some other automated build process), make sure you pass /r:/usr/lib/mono/4.0/System.Xml.dll as one of the arguments to your dmcs build command.

Only for didatic purposes, here is the references editing option in MonoDevelop, in which you should choose to add a reference:
References editing menu in MonoDevelop

  • Note: your distro could have installed System.Xml.dll in another path, so please verify.
  • Your monodoc problem is an entirely different issue and probably means either a directory or file is missing from the installed docs or there is a bug in monodoc entirely

Upvotes: 2

Related Questions