문제

According to the list of available namespaces in a PCL project, System.Xml is incldued. However, I get compile errors when referencing XmlTextReader, which is within System.Xml namespace.

I target .NET 4.0 + Silverlight 5 (Profile14). I also tried .NET4.0.3 + SL (Profile19) and .NET 4.5 + SL (Profile24), all the same.

So is XmlTextReader supposed to be available in a PCL, and if not, where can I find the definite list of what Classes are available and what not?

도움이 되었습니까?

해결책

It is not, but you can use XmlReader.Create() instead. BTW, it's the recommended solution for full .Net too:

Note

Starting with the .NET Framework 2.0, we recommend that you create XmlReader instances by using the XmlReader.Create method to take advantage of new functionality.

As usual, there's s a tool for that. And here is a short intro to it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top