An XmlDocument type was not found, although I referenced System.XML?

I referenced System.Xml:

using System.Xml;

Then in this line:

XmlDocument xdoc = new XmlDocument();

I get:

The type or namespace name "XmlDocument" was not found.

What could be wrong?

information:

.NET 3.5, C #, triple checked that it is referenced and used in the same document, was able to use similar and even child libraries (System.Linq; System.Xml.Linq; System.Xml.XPath; System.Xml;)

+3
source share
5 answers

, System.Xml.dll . , , System.Xml. *, , System.Xml, , .

, , - VS.

+8

, SilverLight?

, , SilverLight, , System.XML Silverlight CLR. System.Linq.XML.

,

Dan

+4

, , , , :

, , , - :
2 : XMLDocument (from msxml.h) XMLDocument ( System.Xml).
, !; -)

+3

, , . Xamarin.Forms, PCL (Profile111), XmlDocument. System.Xml.Linq.XDocument. WindowsPhone XmlDocument .

+1

If you are using Visual Studio code, you need to include the .NET package from NuGet . You can also just include the System.Xml.XmlDocument package directly if that is all you need.

0
source

Source: https://habr.com/ru/post/1740459/


All Articles