ConfigurationManager could not be found



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

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

我有System.Configuration的参考资料。其他问题我都试过了,但都不行。

如果我尝试使用方法System.Web.Configuration.WebConfigurationManager.AppSettings访问AppSettings,它会给我一个错误,即Configuration没有类型名称或命名空间

VS 完全错误

有人能帮我修一下吗?

哦,哇。。。

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

现在,它运行良好

相关内容

最新更新