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?
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:
- Open a file in the XML editor.
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.
- 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.
- Click OK.
Specifically, you want to set the "Use" column for the "DotNetConfig.xsd" schema to "Auto".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With