获取编译错误在C#中有关不引用了System.XML,没错了System.XML正在参考 [英] Getting a compile error in c# about not referencing System.XML, yes System.XML is being reference
问题描述
我想一个新的功能添加到旧程序我写的。然而,当试图获得该程序建立在VS表达它吐出回一个错误信息给我。
I am trying to add a new feature to an old program I wrote. However, when trying to get the program to build in VS express it spits back an error message to me.
错误1型'系统.Xml.Serialization.IXmlSerializable'是在未引用的程序集定义
。您必须添加一个
引用程序集的System.Xml,版本= 4.0.0.0,文化=中立,
公钥= b77a5c561934e089'。 C:\Path\To\File\summaryForm.cs 101 18
SerialController
Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Path\To\File\summaryForm.cs 101 18 SerialController
然而事情是在CS文件的顶部,它有
However the thing is at the top of the cs file, it has
using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
任何想法whyits无法识别XML参考?
Any ideas whyits not recognizing the XML reference?
推荐答案
使用一个命名空间并不意味着你引用的东西。你需要的添加引用到了System.XML
。
Using a namespace does not mean you referenced something. You need to add a reference to System.XML
.
如果您使用的是Visual Studio中,右键单击引用,单击添加引用的选择了System.XML
。
If you are using Visual Studio, right click on references, click Add Reference and then select System.XML
.
这篇关于获取编译错误在C#中有关不引用了System.XML,没错了System.XML正在参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!