4

Adding a setting to Settings.settings:

enter image description here

causes Visual Studio 2010 to create an app.config file, and mirror the settings in it:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    [...snip...]
    <userSettings>
        <ContosoManagementSystem.Properties.Settings>
            <setting name="foo" serializeAs="String">
                <value>bar</value>
            </setting>
        </ContosoManagementSystem.Properties.Settings>
    </userSettings>
</configuration>

But when Visual Studio does this, Visual Studio complains that Visual Studio doesn't know what Visual Studio did:

Could not find schema information for the attribute 'name'.

What gives?


Note the similar question that doesn't apply to this question:

  • Visual Studio 2010 vs Visual Studio 2008
  • accepted answer doesn't work

There some suggestions to alter the schemas used by app.config:

enter image description here

Visual Studio default schema to C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig.xsd

i've tried changing it to other schemas:

  • "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig30.xsd"

    causes VS to choke on DotNetConfig30 itself (The complexType 'configSection_section' has already been declared.)

  • "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig.xsd" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig30.xsd"

    causes VS to choke on DotNetConfig30 itself (The complexType 'configSection_section' has already been declared.)

  • "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig.xsd" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig20.xsd" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig30.xsd" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\Schemas\DotNetConfig35.xsd"

    causes VS to choke on DotNetConfig30 itself (The complexType 'configSection_section' has already been declared.)

How do i make Visual Studio 2010 not give errors as a result of something Visual Studio 2010 did when i editing something in Visual Studio 2010.

Ian Boyd is getting aggravated.

Community
  • 1
  • 1
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219

0 Answers0