简体   繁体   English

在我的.Net标准库项目中,System.Configuration.ConfigurationManager似乎不起作用

[英]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.

相关问题 如何在 .netstanard 库中为 .net 核心和 .netframework 使用 System.Configuration.ConfigurationManager - How to use System.Configuration.ConfigurationManager in .netstanard library for .net core and .netframework System.Configuration.ConfigurationManager未解析 - System.Configuration.ConfigurationManager is not resolved 无法将System.Configuration.ConfigurationManager添加到.NET核心应用程序 - Cannot add System.Configuration.ConfigurationManager to .NET core application ConfigurationManager 存在于 System.Configuration.ConfigurationManager 和 System.Configuration 中 - ConfigurationManager exists in both System.Configuration.ConfigurationManager and in System.Configuration 静态类System.Configuration.ConfigurationManager的别名; - Alias to static class System.Configuration.ConfigurationManager; 使用 Quartz.net 时无法加载类型 System.Configuration.ConfigurationManager - Could not load type System.Configuration.ConfigurationManager while using Quartz.net 无法加载文件或程序集“System.Configuration.ConfigurationManager” - Could not load file or assembly 'System.Configuration.ConfigurationManager' FileNotFoundException:无法加载文件或程序集“System.Configuration.ConfigurationManager, - FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, 如何解决 .net 标准中的命名空间“System.Configuration”错误中不存在类型或命名空间名称“ConfigurationManager”? - How to solve type or namespace name 'ConfigurationManager' does not exist in the namespace 'System.Configuration' error in .net standard? System.Web.Configuration.WebConfigurationManager和System.Configuration.ConfigurationManager之间的行为差​​异 - Differences in behavior between System.Web.Configuration.WebConfigurationManager and System.Configuration.ConfigurationManager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM