Can't use System.XML in Mono even though “About” dialog says it's loaded

别说谁变了你拦得住时间么 提交于 2019-12-02 20:59:28

问题


I'm getting desperate here; I'm trying to use XML serialization with some vanilla classes in Mono. [DataContract] and [DataMember] won't resolve, and using System.XML is impossible; it's just not in the list and won't compile suggesting a missing assembly reference.

In the About-dialog I can clearly see that the System.XML library is loaded. How can I make it accessible to my project?

MonoDevelop 3.0.5
Runtime: Mono 2.10.9 (tarball), GTK 2.24.10, GTK# (2.12.0.0), Package version: 210090011

I really don't know what to do anymore, please help!


回答1:


The About dialog is indicating that it's loaded into MonoDevelop itself, since MD uses System.Xml. The list of assemblies there is purely for diagnosing problems with MD.

You need to find your project in the Solution Pad, then find the "References" folder. This isn't an actual folder, but instead is a representation of the assemblies referenced by your project. Double-click on it to get to the "Edit References" dialog, from which you can add more references. You can also get there via the "Edit references command in the right-click menu on the References folder, and in the Project menu.



来源:https://stackoverflow.com/questions/13553507/cant-use-system-xml-in-mono-even-though-about-dialog-says-its-loaded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!