假设以下项目结构:
项目A:
ConfigurationManager.AppSettings["key"];
.net 完整框架 (4.6.2)
通过以下方式内部访问配置:
项目乙:
.net core 2.0(编译为.net 4.6.2)
参考和使用项目 A
问题:
.net 核心使用新的配置机制 - 有没有办法以一种方式连接 .net 核心配置(在项目 B 中),使项目 A 能够通过 ConfigurationManager 使用配置 - 即项目 A 中没有代码更改?
在此答案中添加 NuGet 包 System.Configuration.ConfigurationManager 仅将 ConfigurationManager 添加到项目 B 但在项目 A 中,ConfigurationManager 没有配置可用
相关分类