locked
app.config xsd. (Invalid schema elements) RRS feed

  • Question

  • Hi,

    In moving from .NET 1.1 to .NET 2.0 I note that the new configuration attributes and classes based on ConfigurationManager validate the app.config file.

    I receive several warnings and messages abount unknown elements in the config file, even though I have declared my config section and used all the necessary attributes.

    Is there a way to associate my configuration section with an XSD to stop this from happening. I wish to remove the messages which I see every time I build.

    I have posted on this topic before, but nobody seems to have an answer.

    Monday, December 19, 2005 5:38 AM

Answers

  • Opening, "C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\DotNetConfig.xsd" in Visual Studio looks like it might have done the trick.

    Tuesday, January 3, 2006 6:40 PM

All replies

  • I've been wondering the same thing. I'm thinking that there's an updated configuration xsd file somewhere for 2.0 and it's just a matter of referencing the new xsd file at the start of the app.config document?

    Tuesday, January 3, 2006 6:33 PM
  • Opening, "C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\DotNetConfig.xsd" in Visual Studio looks like it might have done the trick.

    Tuesday, January 3, 2006 6:40 PM
  • hi, i got the same problem, but i solved this way: first click on app.config , add your elements and at menu click create xml, vs2005 will create a xsd schema based on your app.config file. save xsd file in your project bin. Then the property of your aap.config there is a deafault schema, change  to point to your saved xsd, and there is no more warnig. that is it and any time you can create your own xsd schema based on only your app.cong elements. .

    Sunday, November 25, 2007 4:21 PM
  • hi galn,
    i wonder the " open source", this is misleading concept of service, becouse there is no open service unless other wise all services are open. my women never ever give me open service or she is not open source. So those who love, oèen source even the the nature d'not admit open sourece except volcan, so for me open source is volcanic source, it vhot like the haqven & cold like the hell.
    by Galan
    Was it helpfull
    Monday, July 28, 2008 5:20 PM