【发布时间】:2012-12-28 16:36:35
【问题描述】:
我正在尝试根据使用 slowCheetah 的构建配置文件更改我的默认用户配置,但是我无法找到正确的使用方法
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MyApp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<MyApp.Properties.Settings>
<setting name="Url" serializeAs="String">
<value>
something
</value>
</setting>
</MyApp.Properties.Settings>
</userSettings>
</configuration>
我一直在努力
<!-- & it's an & escaped in xml-->
<add key="MyApp.Properties.Settings.Url" value="www.google.com" xdt:Transform="Replace" xdt:Locator="Match(key)"/>
但它不起作用。
我该怎么做?
【问题讨论】:
-
你想做什么?您想在
<MyApp.Properties.Settings>中添加一行吗? -
我想用默认值替换一个值,以生成正确的部署设置
-
但是在你的配置文件中你没有
MyApp.Properties.Settings.GigaSpaceLocator所以没有什么可以替换 -
这是一个复制粘贴错误。看更新的问题,设置叫Url
标签: c# .net settings slowcheetah