Xml – Schema Issue: The global element ‘ ‘ has already been declared

web.configxmlxsd

The problem I'm having is very similar to the post here:
"Global element 'configuration' has already been declared" in web config

The solution for it is unclear to me though.

When I open my web.config file listed under Views, I too get about 40 warnings telling me:

The global element ' ' has already been declared. This includes configuration, location, configSections, appSettings, etc.

Am I missing an .xsd file somewhere?

When I click on the "XML" tab and "Schemas…" option,
it tells me that I am using the following .xsd's:

  • RazorCustomSchema.xsd
  • EntityFrameworkConfig_5_0_0.xsd
  • DotNetConfig40.xsd

I started to think that maybe I needed to add an EnterpriseLibarary.xsd to it,
but I'm not sure if that is the best solution for this. If it is, I do not know
where to find that specific .xsd. So if it is necessary, it would be helpful if
someone could point me in the right direction of where to find it, and how to add it properly.

Thanks!

Best Answer

Open XML->Schemas... to get the current XML schema set.

You probably have one or more duplicated or overlapping schema files selected. (e.g. DotNetConfig.xsd and DotNetConfig45.xsd).

You only want one of them so make the other set to automatic under the "Use" column.

Related Topic