.net-core - System.Configuration.ConfigurationManager.ConnectionStrings 在运行时检索旧值
问题描述
在我的 dotnetcore winforms 应用程序中,当在 IDE 中运行时,我能够从 app.config 正确获取连接字符串
var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
对于运行时,我想我只是替换 MyApp.Win.config 文件中的连接字符串。但是,连接字符串是从 MyApp.Win.dll.config 中提取的
解决方案
推荐阅读
- presto - 如何在 Presto SQL 中左连接?
- database - 发送 zip 文件并保持文件路径一致
- java - 从 Windows 命令推广将 unicode 字符串传递给 java
- javascript - $(...).sparkline 不是函数(jQuery Sparklines)
- perforce - 为什么 Perforce 填充命令很慢?
- azure-service-fabric - ImageStoreService IdleSecondary 副本
- node.js - nodejs Express 正则表达式路径:在测试中工作,而不是在代码中工作。我做错了什么?
- algorithm - 检测我的数字异常增长/下降的算法
- sql-server - 在第一个 SELECT 中分配的变量不会在第二个 SELECT 中检索
- android - 工具栏后退/主页按钮的 Xamarin 资源 ID 与 Resource.Id.home 不匹配