首页 > 解决方案 > System.Configuration.ConfigurationManager.ConnectionStrings 在运行时检索旧值

问题描述

在我的 dotnetcore winforms 应用程序中,当在 IDE 中运行时,我能够从 app.config 正确获取连接字符串

  var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

对于运行时,我想我只是替换 MyApp.Win.config 文件中的连接字符串。但是,连接字符串是从 MyApp.Win.dll.config 中提取的

文档在这里。

标签: .net-coreapp-configxaf

解决方案


推荐阅读