2010-03-10 85 views
1

我在VS2005上遇到了一些奇怪的问题。.NET上的用户设置

我配置了几个用户设置,但每次启动项目时(在发布模式下)都会附带以前测试过的配置。

我试过多次同步它,但我无法成功。大多数这些属性默认情况下都是空字符串。我也有一个安装程序类和项目,但我不确定这些是否会影响此行为(我只在另一个项目中单击我要调试)

有什么想法?

编辑

我已经删除了这些

Where are user-mode .NET settings stored?

回答

1

尝试打开app.config文件项目。我已经看到它定义了多个设置部分(特别是如果您曾经重命名过您的项目)。

尝试摆脱任何多余的设置部分(不要忘记删除从configSections标签型材件为好。)

<configuration> 
    <configSections> 
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 
     <section name="ProjectName.Properties.Settings" /> 
     <!-- Remove this --> 
     <section name="OldProjectName.Properties.Settings" /> 
    </sectionGroup> 
    </configSections> 
    <userSettings> 
    <ProjectName.Properties.Settings> 
     <!-- Project Settings Appear here --> 
    </ProjectName.Properties.Settings> 
    <!-- Remove this --> 
    <OldProjectName.Properties.Settings> 
     <!-- Old Project Settings Appear here --> 
    </OldProjectName.Properties.Settings> 
    </userSettings> 
</configuration> 

只是一个想法。

+0

感谢您的想法,但该文档实际上只包含一组设置。 :/ – 2010-03-10 01:38:33