[英]In my .Net Standard Library project, System.Configuration.ConfigurationManager does not seem to work
In my .Net Standard Library Project, System.Configuration.ConfigurationManager does not seem to work. 在我的.Net标准库项目中,System.Configuration.ConfigurationManager似乎不起作用。
Even the method Does not get called, which contains the Statement 甚至不调用包含语句的方法
object o = ConfigurationManager.GetSection(_strSectionName);
I have Installed the Nuget package System.Configuration.ConfigurationManager version 4.6.0 我已经安装了Nuget包System.Configuration.ConfigurationManager版本4.6.0
But if I right click on ConfigurationManager in this statement, 但是,如果我在此语句中右键单击ConfigurationManager,
object o = ConfigurationManager.GetSection(_strSectionName);
It shows me the metadata of version 4.0.2.0, namely 它显示了版本4.0.2.0的元数据,即
Assembly System.Configuration.ConfigurationManager, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
where I think the version it should go to is 4.6.0. 我认为应该使用的版本是4.6.0。
Maybe that is causing the problem. 也许是造成问题的原因。
The assembly version is correct, it should be 4.0.2.0
, this is separate from the package version (here 4.6.0
). 程序集版本正确,应为4.0.2.0
,与软件包版本(此处为4.6.0
)分开。
This is not the cause of your problem. 这不是您的问题的原因。 The next thing to look at is the exception, or the incorrect behaviour. 接下来要看的是异常或不正确的行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.