如何“更改应用程序会话之间的设置值”在 C# 应用程序中?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅以下文章中的“设置文件位置”部分: 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 inuser.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.