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>
残念ながら、これは機能しません。「configSource ファイルの形式は、セクションの名前を含む要素である必要があります」というエラーが表示され、2 行目 (2 番目のコード例) が強調表示されます。
すべてを機能させるには、タグにどのように名前を付ける必要がありますか?
編集:「applicationSetting」タグの削除も機能しません。