开发者

<userSettings> in app.config Could not find schema information for the element 'userSettings'

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" allowExe开发者_如何学运维Definition="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


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.


I just had this same issue. The fix I came across was to do a 'Clean Solution' followed by a 'Rebuild Solution'. This seems to rebuild the files correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜