DAAB Config Question

Topics: Data Access Application Block
May 25, 2007 at 8:22 PM
I am using Enterprise Library 2 with version 2.0 of the .Net Framework.

I have a Data Access Block Configuration question. I set up my app.config file:

<dataConfiguration defaultDatabase="TaskProgram" />
<add name="TaskProgram" connectionString="Server=conx_testServer.com;User=testuser;Password=testPass;"
providerName="System.Data.OracleClient" />

Everything works and the program runs but I have 2 compiler warnings. They are:

1. Could not find schema information for the element ‘dataConfiguration’.
2. Could not find schema information for the attribute ‘defaultDatabase’.

Both refer to first line in my code sample: <dataConfiguration defaultDatabase=”TaskProgram” />

I have researched these issues and found postings on the web asking questions about this same issue but I have not found any solutions that work for my instance of this problem.

Any assistance would be greatly appreciated.

May 26, 2007 at 7:03 PM
Those warnings only show up when you have the configuration file open in the IDE. Just close the configuration file and you won't see the warnings.

The warnings will happen anytime there are configuration sections in a web.config / app.config that don't have optional schema files associated with them to help with validation and Intellisense. This would be true of any configuration sections, even those not associated with Enterprise Library. EntLib provides a GUI Configuration Tool that does the configuration and validation for you.

Just close the configuration file and you won't see the warnings.




David Hayden
Microsoft MVP C#

Dec 23, 2008 at 11:15 PM
Edited Dec 23, 2008 at 11:16 PM
Here it is 18, 19+ months later and this problem continues ...

Is there any reason in particular that the schema can not be updated?  Seems to me the schema is not correct and that IS a problem. Closing the file in the IDE is NOT, IMHO a solution to a problem. I, for one, want ALL my Xml to properly confirm to schema specifications and therefore correctly validated and accurate. Not doing so has lead to more problems than I care to talk about.

Jan 21, 2009 at 7:01 AM
We have this problem too. I've tried to search for a version of the xsd schema for validating app.config / web.config when the Logging configuration block is present.

Is there an update version of C:\Program Files\Microsoft Visual Studio 9.0\xml\Schemas\DotNetConfig.xsd or can we add another schema for the EntLib?

Feb 10, 2009 at 7:54 PM
We never had one that can be plugged into VS.
Producing one is tricky since EntLib config is dynamic.
The EntLib configtool, however, can do the validation against the dynamically produced schema and generate valid xml config.
Jan 10, 2010 at 1:44 PM

The solution for me was pretty simple.

I've done primary definition , and despite rebuild of my project got 73 messages of warnings in this manner:

solution Could not find schema information for the element 'loggingConfiguration'

I've remembered that I am refferencing the dll's in my Project Folder , with future thought to move my project and not to rely on microsoft installation folder of enterprise library.

All I needed to do is to put xml files , that came with the installation , into my project folder and restart Visual Studio , so it"ll see the xml - es ,

and also when the app.config is not open i don't see the warnings.