假设以下项目结构:
项目A:
ConfigurationManager.AppSettings [“ key”];
项目B:
问题:
.net核心使用新的配置机制-是否可以通过一种方式挂钩.net核心配置(在项目B中),该方式将使项目A可以通过ConfigurationManager使用配置-即在项目A中无需更改代码?
在此答案中添加NuGet包System.Configuration.ConfigurationManager就像在此答案中一样 仅将ConfigurationManager添加到项目B中,但在项目A中无法通过ConfigurationManager使用任何配置