Share via


The global element 'configuration' has already been declared

Question

Wednesday, December 24, 2014 8:46 AM

Hello.

I have a problem in my app.config:

<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <section name="Project.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
        </sectionGroup>
    </configSections>

Warning 1 The global element 'configuration' has already been declared. ...\app.config 3 4 Project_Forest

In the folder %Program Files%\Microsoft Visual Studio [version] \Xml\Schemas\ 

I have not file:  EnterpriseLibrary.Configuration.xsd

Any idea ?

All replies (3)

Saturday, December 27, 2014 2:57 AM ✅Answered

You must have a close tag '</configuration>' in your app.config and if there are more than one tag <configuration></configuration> in the app.config you can delete, the app.config must have an exclusive tag <configuration></configuration>.

Hope above help !

Doanh

 


Thursday, December 25, 2014 3:08 AM

Hi asoftJosto,

Thank you for posting in MSDN forum.

Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. So I’m afraid that it is not the correct forum for this issue.

To help you find the correct forum for this issue, could you please tell me which kind of app you create in VS IDE?

In addition, about the error message, I find a similar thread for this issue. From Tommy suggestions, I suggest you need to make sure the EnterpriseLibrary.Configuration.xsd is in %Program Files%\Microsoft Visual Studio [version] \Xml\Schemas\ first of all.  About more detailed message, please see the following link:http://stackoverflow.com/questions/11816916/fix-the-global-element-configuration-has-already-been-declared  

If it still doesn't work, please provide more message about this issue for me so that we will find correct forum support this issue.

Thanks for your understanding.

Best Regards,

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Saturday, April 15, 2017 10:05 AM

http://stackoverflow.com/questions/11816916/fix-the-global-element-configuration-has-already-been-declared

Maybe you upgraded Visual Studio and find old schemas in the property window of Web.config

I had this after migrating to VS 2017 and simply removed the old references to the older folders.