views:

125

answers:

1

Hello when I try to add parameters to the settings table I get multiple messages for each parameter I add.

e.g.:

  • Could not find schema information for the element 'userSettings'

  • Could not find schema information for the element 'setting'

  • Could not find schema information for the attribute 'serializeAs'

In the app.config I get:

<project1.Properties.Settings>
   <setting name="ccc" serializeAs="String">
      <value>vvv</value>
    </setting>
</project1.Properties.Settings>

I can use, edit and save this parameter, but the messages really annoy me.

I use the following schema (and selecting other like 20 and 30 did not help):

C:\Program Files (x86)\Microsoft Visual Studio 9.0\xml\Schemas\DotNetConfig.xsd

Any ideas?

edit: following Hans post here is my configSections

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

I don't know what it is for and if I should change it - yet here it is :)

Thanks Asaf

+1  A: 

Well, that doesn't look healthy. Note how it is not valid XML, the project... element is mismatched with RuthSiteManager...

Not sure how it got that way, you'll have to edit it into shape. I guess you want to rename "project1". Avoid editing the .config file by hand otherwise. And make sure you have the required <configSections> element as well.

Hans Passant
my bad - tried to change the tag (of my project name) to a name that is understandable to others and forgot to change the enclosing tag. I apologize and thank you for your help
Asaf
Sigh. It is still not complete, the `<userSettings>` element is missing. Should appear above `<project1.Properties.Settings>`. Of course, could be the source of the error. Start a new project, add some settings and compare the .config files.
Hans Passant
I have the <userSettings> element - I believe the problem is in the schema - yet it's not critical to my project - so I'll give up, to save my time and more important - yours :) ... Thank you again
Asaf