我有一个基于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
现在,它运行良好