[英]App.config modifications revert after exit
我正在修改MyApp.vhost.exe,並且正如我在文本編輯器中看到的那樣修改了App.vhost.exe,但是當我停止調試應用程序時,App.config值恢復為更改前的狀態。 。 我做錯了什么或我想念什么?
Configuration exeConfiguration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var section = exeConfiguration.GetSection(monitorSectionElementName);
if (section != null)
{
var monitorPathElements = (section as MonitorSection).MonitorPaths;
monitorPathElements[monitorPath].CheckSum = checkSum;
}
exeConfiguration.Save(ConfigurationSaveMode.Full, true);
ConfigurationManager.RefreshSection(monitorSectionElementName);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.