Asp.net Webdeployment Project override applicationSettings

Posted by citronas on Stack Overflow See other posts from Stack Overflow or by citronas
Published on 2010-02-25T12:04:54Z Indexed on 2010/03/09 10:36 UTC
Read the original article Hit count: 482

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.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about webdeploymentproject