如何“更改应用程序会话之间的设置值”在 C# 应用程序中?

发布于 2024-09-18 11:10:06 字数 311 浏览 2 评论 0原文

MSDN 网页 页面 听起来不错轻松手动更改应用程序设置。但我找不到该文件。我可以在我的开发路径中找到该文件,但我不知道这是否是应用程序实际运行的路径。我在“settings.settings”中设置了数据库连接设置,现在我想在我的计算机上更改它。我知道我的 Foo.exe 有一个 Foo.exe.config,但我找不到它。

它在哪里?我如何找到它?

The MSDN web page makes it sound easy to change application settings by hand. I can't find the file though. I can find the file in my development path, but I have no idea if that is the path the application is actually running in. I set a DB connection setting in "settings.settings" and now I want to change it on my machine. I understand that for my Foo.exe there is a Foo.exe.config, but I can't find it.

Where is it? How do I find it?

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

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

发布评论

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

评论(1

同展鸳鸯锦 2024-09-25 11:10:06

请参阅以下文章中的“设置文件位置”部分: http:// msdn.microsoft.com/en-us/library/8eyb2ct1.aspx

应用程序级别设置和默认用户级别设置将存储在同一目录中的 yourProgram.exe.config 中作为可执行文件。用户级别设置存储在 user.config 中,其位置因部署方法而异。

您在 C:\Documents and Settings\laqlu\Local Settings\Apps\... 中提到的路径不是缓存文件,它是实际的用户级设置文件。改变它的内容将会影响你的程序。

Refer to the section "Settings File Locations" in the following article: http://msdn.microsoft.com/en-us/library/8eyb2ct1.aspx

The application-level settings and default user-level settings will be stored in yourProgram.exe.config in the same directory as the executable. The user-level settings are stored in user.config in a location which differs according to the deployment method.

The path you mention in C:\Documents and Settings\laqlu\Local Settings\Apps\... is not a cached file, it is the actual user-level settings file. Changing its content will affect your program.

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