.NET 上的用户设置

发布于 2024-08-24 17:01:10 字数 349 浏览 6 评论 0原文

我在 VS2005 上的一个项目中遇到了一些奇怪的问题。

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

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

有什么想法吗?

编辑

我已经删除了这些

用户模式.NET 设置存储在哪里?

I'm having some weird trouble with a project on VS2005.

I have a few user settings configured, but every time i start the project (on release mode) it comes with a previously tested configuration.

I've tried synching it many times, but i cannot succeed. Most of these properties are empty strings by default. I have a installer class and project also, but i'm not sure if these are affecting this behavior (i'm clicking only in the other project i want to debug)

Any thoughts?

EDIT

i already deleted these

Where are user-mode .NET settings stored?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦幻的心爱 2024-08-31 17:01:10

尝试打开项目中的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>

只是一个想法。

Try opening the app.config file in the project. I have seen it where multiple Settings sections get defined (especially if you have ever renamed your project).

Try getting rid of any superfluous Settings sections (don't forget to remove the section element from the configSections tag as well.)

<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>

Just an idea.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文