c# 读取app.config遇到生成X.config.config问题

string exePath = System.IO.Path.Combine(Environment.CurrentDirectory, "WindowsFormsApp.exe");
            // Get the configuration file.
            Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
            AppSettingsSection appSettings = config.Sections["appSettings"] as AppSettingsSection;
            MessageBox.Show(appSettings.Settings["test"].Value);

原文地址:https://www.cnblogs.com/mandalaluo/p/4737388.html