Schema problem: global element already declared

The problem I am facing is very similar to the message here: "The configuration of the global element is already declared in the web configuration

The solution for this is not yet clear to me.

When I open my web.config file specified in the Views section, I also get about 40 warnings telling me:

The global item is already declared. This includes configuration, location, configurations, applications, etc.

Am I missing a .xsd file somewhere?

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

  • RazorCustomSchema.xsd
  • EntityFrameworkConfig_5_0_0.xsd
  • Dotnetconfig40.xsd

I started thinking that maybe I needed to add EnterpriseLibarary.xsd, but I'm not sure if this is the best solution for this. If so, I donโ€™t know where to find this particular .xsd. Therefore, if necessary, it would be useful if someone could point me in the right direction, where to find it, and how to add it correctly.

Thanks!

+5
source share
3 answers

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

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

You want only one of them to make another set automatically in the "Use" column.

+7
source

This is strange, but for me this problem was fixed after I closed the file in the editor that caused these warnings and recompiled.

+3
source

I follow the step below and all my warnings are removed

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

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

I select DotNetConfig45.xsd as automatic start and restart visual studio. It works great.

+1
source

Source: https://habr.com/ru/post/1200136/


All Articles