views:

46

answers:

1

I got a web deyploment project for a web application project in vs 2008. While building the web deployment project, I want to replace properties in the web.config.

My settings are autogenrated by the deisgner.

<applicationSettings>
 <NAMESPACE.Properties.Settings>
   <setting name="Testenvironment" serializeAs="String">
    <value>True</value>
   </setting>

  </NAMESPACE.Properties.Settings>
</applicationSettings>

In the config file which contains the settings for the specific server looks like the following:

<?xml version="1.0"?>
<applicationSettings>
    <NAMESPACE.Properties.Settings>
       <setting name="Testenvironment" serializeAs="String">
        <value>False</value>
       </setting>
    </NAMESPACE.Properties.Settings>
</applicationSettings>

Sadly, this does not work. I get an error "The format of a configSource file must be an element containing the name of the section" that highlights the second line (2nd example code).

How must the Tag be named in order to make evertything work?

Edit: Deleting the "applicationSetting"-Tags does not work either.

A: 

Found the problem/solution:

In the web deployment project I said that

appSettings=FILENAME.config

rather than

applicationSettings/NAMESPACE.Properties.Settings=FILENAME.config

Works fine now

citronas