【发布时间】:2013-08-22 16:33:42
【问题描述】:
为了操作在我的 VS 项目中使用的 dll,我必须更新 dll 指向的引用。我通过修改 csproh 的 XML 来做到这一点(是的,这有效)。
但是,这一次我想添加一个 SpecificVersion 引用,所以 <SpecificVersion xmlns="">False</SpecificVersion> 但是当您在 Reference 元素下有一个自定义 xml 命名空间时,您不能使用 microsoft build engine 进行构建。如何删除 SpecificVersion 节点内的xmlns=""?
<SpecificVersion xmlns="">False</SpecificVersion>
XmlElement SpecificVersionElement = refNode.OwnerDocument.CreateElement("SpecificVersion");
SpecificVersionElement.InnerText = "False";
refNode.AppendChild(SpecificVersionElement);
【问题讨论】:
-
我已经编辑了你的标题。请参阅“Should questions include “tags” in their titles?”,其中的共识是“不,他们不应该”。