读APPSETTING行简单: _nowVersion = ConfigurationManager.AppSettings["nowVersion"]; 以前与配制通过操作XML文件来进行,现在可以修改为以下方式: ExeConfigurationFileMap filemap = new ExeConfigurationFileMap(); filemap.ExeConfigFilename = " AupdateConsole.exe.config " ; Configuration config = ConfigurationManager.OpenMappedExeConfiguration(filemap, ConfigurationUserLevel.None); config.AppSettings.Settings[ " nowVersion " ].Value = _nowVersion; config.AppSettings.Settings[ " siteCode " ].Value = _siteCode; config.AppSettings.Settings[ " siteName " ].Value = _siteName; config.AppSettings.Settings[ " appId " ].Value = _appId; config.AppSettings.Settings[ " appCode " ].Value = _appCode; config.Save(); return true ;