Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

xml - VS 2015 RTM web.config The Global element 'configuration' has already been declared

Getting this problem on 3 PCs with a fresh installation of VS 2015 RTM. There are no issues when the file is opened in VS 2013. Steps described in Fix: The Global element 'configuration' has already been declared and other related questions don't help as VS ignores any changes on the XML schema dialog. Ideas?

question from:https://stackoverflow.com/questions/31540122/vs-2015-rtm-web-config-the-global-element-configuration-has-already-been-decla

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Unfortunately, there are a number of situations that can cause this problem.

The most likely problem though is that the schema for the document has been set incorrectly. This can happen when you install a newer version of .NET and/or Visual Studio on the computer. The fix is simple though.

From the 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.

Specifically, you want to set the "Use" column for the "DotNetConfig.xsd" schema to "Auto".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...