应用配置文件未保存 [英] App Config File not saving

查看:120
本文介绍了应用配置文件未保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用从MSDN提取的以下代码,但它没有更新我的app.config文件。
我错过了什么吗?

I am using the below code lifted from MSDN, but its not updating my app.config file. Am I missing something? Please help.

private void button1_Click(object sender, EventArgs e)
{
    Properties.Settings.Default.reliefPath = "reliefPath";
    Properties.Settings.Default.Save();
}

我的目标是.NET 2.0。

I am targeting .NET 2.0.

推荐答案

app.config本身从未更新。而是在隔离存储中为您的应用程序创建一个副本。我相信它位于您个人资料的AppData\漫游目录下。然后在您下次运行应用程序时加载该文件

The app.config itself is never updated. Instead a copy is created in the isolated storage for your application. I believe it's under your profile's AppData\Roaming directory. That file is then loaded next time you run your application

这篇关于应用配置文件未保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆