'System.Xml.IXmlLineInfo'问题 [英] Problem with 'System.Xml.IXmlLineInfo'

查看:125
本文介绍了'System.Xml.IXmlLineInfo'问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

整个互联网都充满这样的问题:

The whole internet is full of such problem:

由于某种原因,网站无法编译,并出现以下错误:

due to some reason web site become uncompilable with the following error:

类型"System.Xml.IXmlLineInfo"为定义在不是参考.您必须添加参考组装'System.Xml,版本= 2.0.5.0,文化=中性,PublicKeyToken = 7cec85d7bea7798e'.

The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

它通常出现在与xml没有任何关系的地方...就我而言,它出现在ascx文件的以下行中:

It often appear in places that don't have any relationship to xml... In my case it is in the following line of the ascx file:

        <br /><%#((Team)Container.DataItem).Href()%>

或另一个:

 Hello, <%=_clu.User.Href(true)%>! ( <a href="/login/UsE_1.aspx">Exit</a> )

我看到我建议删除所有对库的引用,停止IIS,删除所有临时文件(我从用户文件夹,窗口文件夹中删除了普通的临时文件,从所有.NET的"Temporary ASP.NET Files"文件夹中删除了所有内容文件夹...

I saw I recommendation to remove all references to library, stop IIS, delete all temp files (I deleted usual temp files from user folder, from window folder, deleted everything from "Temporary ASP.NET Files" folder of all .NET folders...

没有帮助...

根本不知道如何继续工作...重新安装Windows?:(

Don't know, how to continue work at all... Reinstall Windows? :(

P.S.我有ASP.NET 4.0网站

P.S. I have ASP.NET 4.0 web site

P.P.S.当我尝试添加参考时,VS告诉我:

P.P.S. When I try to add reference VS tolds me:

该网站已经在引用程序集"System.XML".

The Web site is already referencing the assembly 'System.XML'.

让我感到困惑的是,"XML"是大写的.但是标准" .NET程序集具有"System.Xml" ...

What is additionaly confuses me is that "XML" is written in upper case. But the 'standard' .NET assembly has "System.Xml"...

推荐答案

在包含第3部分库之后,我出现了这个问题.我有旧版本的库和新版本的库.我已通过以下方法解决了问题:

I've got that problem appeared after including 3rd part library. I had the previous version of library and the new one. I've resolved problem by the following:

  1. 将我的源代码回滚到以前的版本;
  2. 删除了该第三方库的所有实例和源代码(临时文件等);
  3. 仅获得所需库的dll的1个副本;
  4. 删除了对OLD lib的引用;
  5. 添加了对新引用的引用.

这篇关于'System.Xml.IXmlLineInfo'问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆