.net 找不到ConfigurationManager

.net 找不到ConfigurationManager,.net,configurationmanager,system.configuration,webconfigurationmanager,.net,Configurationmanager,System.configuration,Webconfigurationmanager,我有一个基于react的前端网站和基于.NETMVC的后端网站 我想在ConfigurationManager中获取AppSettings方法,但是VS告诉我,System.Configuration中没有ConfigurationManager类型名称 我有一个关于系统配置的参考。其他问题我都试过了,但没用 如果我尝试使用方法eSystem.Web.Configuration.WebConfigurationManager.AppSettings访问AppSettings,则会出现一个错误,即

我有一个基于react的前端网站和基于.NETMVC的后端网站

我想在
ConfigurationManager
中获取AppSettings方法,但是VS告诉我,
System.Configuration中没有
ConfigurationManager
类型名称

我有一个关于
系统配置的参考。其他问题我都试过了,但没用

如果我尝试使用方法e
System.Web.Configuration.WebConfigurationManager.AppSettings
访问AppSettings,则会出现一个错误,即
Configuration

有人能帮我修一下吗?

噢,哇

使用nuGet,我必须搜索
system.configuration
,然后才能安装
system.configuration.ConfigurationManager


现在,它工作正常了

我相信您需要System.Configuration.ConfigurationManager.AppSettings而不是System.Web.Configuration.WebConfiguration.Manager.AppSetting我已经尝试过了,但是我无法访问funktion
System.Configuration.ConfigurationManager.AppSettings
,因为它找不到
System.Configuration.ConfigurationManager