Peter Ritchie Inc. Software Consulting Co. Home
      Downloads    General    .NET Topics    C++ Topics    C# Topics

Home
Products & Services
Articles/Blog
Downloads
Links
Members Only
Support
Contact
Login
Register
Silly config file warnings

Posted by on Friday, March 24, 2006 (EST)

I decided to take a closer look at some warnings in Visual Studio 2005 with regard to the config files it creates/updates.

I've been noticing some warnings with various config files that Visual Studio creates/maintains/updates and I thought I'd have a closer look.  In particular, warnings regarding the section.requirePermission attribute and the trace/listeners/add.initializeData attribute.

When I first looked that these config files there was no xmlns attribute on the configuration element, so, I thought that was the cause.  A little research seemed to show that xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0" was the configuration file namespace.  Adding the xmlns attribute to the configuration section quickly made Visual Studio not recognize any elements--clearly the wrong thing to do.

I then had a look at properties for the app.config document in Visual Studio and it showed "C:\Program Files\Microsoft Visual Studio 8\xml\Schemas\DotNetConfig.xsd" in the Schemas property.  Once I had a look at this DotNetConfig.xsd file I found what the problem was.  This file is not completely accurate when compared to the documented attributes; in particular it didn't have schema information for the two aforementioned attributes.

So, I quickly added the schema information and the warnings disappeared.

I've made a more accurate version of this file available at http://www.peterritchie.com/Hamlet/Downloads/74.aspx.



Average Rating:

Comments:

msprop warning
By derdour on Friday, November 03, 2006 (EST)

There's warnings when viewing xsd generated DataSet file.

So I tryed to find msprop xsd file, an I do not find It any where!

 

Is it the same problem described in the post, and how can I have the msprop schema file?

Reply to this Comment

Generated dataset
By Peter Ritchie on Friday, November 17, 2006 (EST)

No, it's a different problem.  But, the solution is similar.  You'll have to track down the XSD file and modify it. 

The warnings are generally benign...

Reply to this Comment

Silly config file warnings
By Philip Danby on Thursday, January 24, 2008 (EST)
I have replaced dotnetconfig.xsd with your version and it removed the section.requirePermission warning. Thank you. However I still get information errors for every setting entry, examples: Could not find schema information for the element 'userSettings'. Could not find schema information for the element 'TestSettings.My.MySettings'. Could not find schema information for the element 'setting'. Could not find schema information for the attribute 'name'. Could not find schema information for the attribute 'serializeAs'. Could not find schema information for the element 'value'. Your comments would be greatly valued.

Reply to this Comment

Add Your Comment

Advertisement
Rent and Buy DVDs. No Late Fees. Click to join Today.

Ottawa, Ontario, CANADA Weather
  • Ottawa, Ontario, CANADA Weather :: 23C Showers in the vicinity
    23C Showers in the vicinity


    Last Refreshed 9/3/2010 6:55:44 PM

  •  
    Copyright © 2005, Peter A. Ritchie All rights reserved