XmlDocument type not found even though I've referenced System.XML?

后端 未结 5 1083
抹茶落季
抹茶落季 2021-01-19 02:49

I\'ve referenced System.Xml:

using System.Xml;

Then in this line:

XmlDocument xdoc = new XmlDocument();

I

5条回答
  •  长发绾君心
    2021-01-19 03:46

    Make sure your project references the System.Xml.dll assembly. It's possible that you're referencing a different assembly that contains other System.Xml.* classes and that might be why you're seeing the System.Xml namespace but without the classes you need.

    If you already have this reference, try removing and re-adding it and see if that irons out some weird VS glitch.

提交回复
热议问题