加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 08:09:53 所属栏目:百科 来源:网络整理
导读:在3个电脑上出现这个问题,全新安装VS 2015 RTM。在VS 2013中打开文件没有问题。 Fix: The Global element ‘configuration’ has already been declared中描述的步骤和其他相关问题没有帮助,因为VS忽略对XML模式对话框的任何更改。想法? 不幸的是,有许多
在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”模式的“使用”列设置为“自动”。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读