Configuration item not declared

I am working on Visual Studio 2012 Express Edition. I added the App.config XML file as follows:

<?xml version="1.0" encoding="utf-8" ?> <configuration> </configuration> 

The first thing that happens is a warning that says: "The Configuration item has not been declared." Does anyone know why this is happening? It seems that elements cannot be declared internally until this is resolved.

Thank!

This is all XML:

 <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="Version" value="779" /> <add key="TimeOut" value="60000" /> <add key="LogFileName" value="Log.txt" /> <!-- your Developer Id with eBay --> <add key="Environment.DevId" value="" /> <!-- your Application Id with eBay --> <add key="Environment.AppId" value="" /> <!-- your Application Certificate with eBay --> <add key="Environment.CertId" value="" /> <!-- API Server URL --> <!-- For production site use: https://api.ebay.com/wsapi --> <!-- For Sandbox use: https://api.sandbox.ebay.com/wsapi --> <add key="Environment.ApiServerUrl" value="https://api.sandbox.ebay.com/wsapi" /> <!-- EPS Server URL --> <!-- For production site use: https://api.ebay.com/ws/api.dll"/--> <add key="Environment.EpsServerUrl" value="https://api.sandbox.ebay.com/ws/api.dll" /> <!-- eBay Signin URL --> <!-- For production site use: https://signin.ebay.com/ws/eBayISAPI.dll?SignIn --> <!-- https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn --> <add key="Environment.SignInUrl" value="https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn" /> <!-- ViewItem URL --> <!-- For production site use: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item={0} --> <add key="Environment.ViewItemUrl" value="http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item={0}" /> <!-- token is for both API server and EPS server --> <add key="UserAccount.ApiToken" value="" /> <!-- eBay site ID --> <add key="UserAccount.eBayUserSiteId" value="0" /> <add key="logexception" value="true"/> <add key="logmessages" value="true"/> <add key="logsdkmessages" value="true"/> <add key="logsdk" value="true"/> <add key="logfile" value="Log.txt"/> <!-- Rule Name--> <add key="RuName" value=""/> <!-- Set this if you access eBay API server behind a proxy server--> <add key="Proxy.Host" value =""/> <add key="Proxy.Port" value =""/> <!-- set proxy server username/password if necessary--> <add key="Proxy.Username" value=""/> <add key="Proxy.Password" value=""/> 

+43
c # xml app-config
Sep 21 '12 at 3:50
source share
7 answers

I had the same problem. This is not a mistake, it is just a warning; therefore, your application must compile. I used the following simple configuration file and the warning is still being generated.

 <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0"sku=".NETFramework, Version=v4.5"/> </startup> </configuration> 

This is a problem raised on the MSDN website, but it does not seem to have been satisfactorily resolved. See the link below:

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/18a1074f-668f-4fe3-a8d9-4440db797439

+16
May 05 '13 at 14:14
source share

Go to the XML menu (menu item at the top of the visual studio), select the schemes and find DotNetConfig.xsd and select this scheme.

Your problem will be exactly solved.

+182
Aug 20 '15 at 10:43
source share
 <configuration xmlns="schema URL"> <!-- configuration settings --> </configuration> 

make changes as above and try

+20
Sep 21
source share

I had to -> Go to the XML menu (menu item at the top of the visual studio) select the schemes and select DotNetConfig.xsd and RazorCustomSchema.xsd and EntityFrameworkConfig_6_1_0.xsd

+5
Jan 06 '16 at 20:48
source share

Select this scheme. Dotnetconfig.xsd

XLM menu ..... Visual Studio

Works great.

+1
Aug 27 '17 at 5:05 on
source share

Visual Studio 2013 Express Edition lacks DotNetConfig.xsd ( https://connect.microsoft.com/VisualStudio/feedback/details/817322/dotnetconfig-xsd-files-not-present-in-vs-2013-express-for-desktop )

So, to get rid of the warning in VS 2013 Express:

The warning should disappear.

0
Dec 29 '16 at 5:38
source share

I only have this pop-up warning appeared in the auto-generated XML file when working on the xaml project.

Using Debug-> Clean Solution and Debug-> Rebuild Solution fixed this. You might want to try this out before you get a feel for the diagrams.

0
Jan 10 '17 at
source share



All Articles