xml – VS 2015 RTM web.config全局元素“配置”已经声明

在3个电脑上出现这个问题,全新安装VS 2015 RTM。在VS 2013中打开文件没有问题。 Fix: The Global element ‘configuration’ has already been declared中描述的步骤和其他相关问题没有帮助,因为VS忽略对XML模式对话框的任何更改。想法?
不幸的是,有许多情况可能导致这个问题。

最可能的问题是,文档的模式设置不正确。这可能发生在您在计算机上安装较新版本的.NET和/或Visual Studio时。修复是简单的。

Visual Studio documentation

  1. Open a file in the XML editor.
  2. In the document properties window,click the button on the Schemas field.

    The XML Schemas dialog Box is displayed. The dialog Box lists all schemas with an .xsd extension in the schema cache (including schemas referenced in the catalog.xml file),and also any schema that is in the current solution,open in Visual Studio,referenced in an xsd:schemaLocation attribute,or referenced in the Schemas property.

  3. Select the schemas to use for validation by doing one of the following:
    • Select a schema listed in the XML Schemas dialog,click the Use column,and then select Use this schema. -OR-
    • Select multiple schemas listed in the XML Schemas dialog,right-click and select Use this schema.
  4. Click OK.

具体来说,您要将“DotNetConfig.xsd”模式的“使用”列设置为“自动”。

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念