I used the second solution of
How to resolve "Could not find schema information for the element/attribute
I.e. created a XSD with the button
After rebooting the system the problem is solved, meaning I do not get any warnings anymore related to the scheme.
So it seems that rebooting (and possibly some implicit restore/reset removed the warning).
Using Visual Studio 2015 Community Edition - generating a web.xsd in the root folder of my project and adding it to the schema list cleared all but one of the warnings,
The global element 'configuration' has already been declared'.
Closing the web.config file in the text editor and rebuilding the project cleared this warning.
With the symptoms as described in the question, and using Visual Studio 2013 (Update 4), I could see in the XML Schemas [sic] dialog that both DotNetConfig.xsd
and DotNetConfig40.xsd
were selected for use.
I'm using a .NET Framework 4.0 project.
The two XSD files conflict with each other, each defining the same elements, causing the warnings to be emitted.
These schema files are contained in the %programfiles(x86)%\Microsoft Visual Studio 12.0\xml\Schemas\
folder.
DotNetConfig.xsd
is in the 1033
sub-folder and appears to be the newer, more complete version.
No matter what settings I selected in XML Schemas, I could not deselect, or remove DotNetConfig40 nor DotNetConfig. I tried "Remove", and changing the Use parameter from "Use this schema" to "Automatic" and then "Do not use this schema".
No matter what was selected, for either file, when I would return to the dialog, both would be selected for use. I also tried the trick of moving to another row before pressing "OK" to no avail.
Finally, I renamed the DotNetConfig40.xsd
file to DotNetConfig40 DO NOT USE.xsd
to prevent it from being loaded. This immediately solved the problem.
I'm not pleased with having to do that, and worry if it'll have an undesired side effect with other projects. I'll update this post with my results.
This issue got fixed once I closed the file in the editor that was causing these warnings and recompiled.
For me i noticed i had a bunch of XML Schemas
that were duplicated, i just simply marked as Don't Use
all the ones that weren't related to Visual Studio 2017. The problem immediately disappeared