Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schema Issue: The global element ' ' has already been declared

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!

like image 696
Ogreintel Avatar asked Aug 12 '14 18:08

Ogreintel


2 Answers

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.

like image 181
mmmBacon Avatar answered Oct 23 '22 19:10

mmmBacon


It is weird but for me this issue got fixed once I closed the file in the editor that was causing these warnings and recompiled.

like image 33
Romonov Avatar answered Oct 23 '22 18:10

Romonov