0

I referenced System.Xml in my code, but XmlDocument still does not show up. Whenever I try to use it, it tells me:

Error: The type or namespace name 'XmlDocument' could not be found (are you missing a
using directive or an assembly reference?)

I saw this link that seemed pretty helpful; unfortunately, I am using a Windows Apps template, and it does not allow me to remove or add references, and I am sure that I am not using Silverlight. I am using Visual Studio 2013, with .NET 4.5. Any help is appreciated.

Edit: I am trying to make a background task. This is how I am using it:

XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate);
Community
  • 1
  • 1
mmking
  • 1,564
  • 4
  • 26
  • 36

1 Answers1

1

I got it: the library had been changed or something, so XmlDocument is no longer under System.Xml. It is now under Windows.Data.Xml.Dom.

This worked:

using Windows.Data.Xml.Dom;
mmking
  • 1,564
  • 4
  • 26
  • 36