I used the second solution of How to resolve "Could not find schema information for the element/attribute <xxx>"?
I.e. created a XSD with the button to create a scheme. I changed the stylesheet in app.config to app.xsd but now I get the warning:
The Global element 'configuration' has already been declared in app.xsd
Even when changing the name the warning is shown. Does anybody have a solution for this?
Rebooting didn't work for me, so I'd like to share what did work.
First, I just upgraded to Windows 8. This problem didn't occur before then. And this issue only happened in one of my app.config files. So I decided to compare the problematic app.config with a good one. In Visual Studio, with the app.config open, I went to Xml -> Schemas
. I noticed that the good config only had three of these schemas checked. The bad one had the same three checked, plus a DotNetConfig.xsd. After I changed the Use
column to automatic, for DotNetConfig.xsd, the problem went away.
I had a similar problem to the question you are referring to, I followed these instructions and everything was fine. Make sure the EnterpriseLibrary.Configuration.xsd
is in %ProgramFiles%\Microsoft Visual Studio [version]\Xml\Schemas\
first of all, then do this:
Enterprise Library installs a schema into Visual Studio that provides IntelliSense® for editing Enterprise Library configuration files in the Visual Studio XML editor. You must turn on the schema before you can use it.
To enable the Enterprise Library configuration schema
- Open the configuration file in Visual Studio by double-clicking it in Solution Explorer.
- On the XML menu, click Schemas... to open the XML Schemas dialog.
- Locate the schema named EnterpriseLibrary.Configuration.xsd. This is installed automatically. However, if it is not shown in the list, click Add and navigate to the folder %Program Files%\Microsoft Visual Studio [version] \Xml\Schemas, then select EnterpriseLibrary.Configuration.xsd and click Open.
- Change the value in the Use column to Use this schema. Then click OK.
Link to the article is here , hopes this helps
My issue was I went from .Net 4.5 to .Net 4.0. To resolve the issue I switched all the ticked schemas to automatic.
I struggled with this for a while as well. Turns out, my version of the problem originated from the hidden {PROJECTNAME}.SUO
file created by Visual Studio.
My guess is, VS will cache the XSD schema associations in this file. The warnings popped up after I changed the target framework, and they disappeared after I deleted the SUO file and restarted VS.
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