System.Configuration.ConfigurationManager未解析

5 c#

在我的使用中,我有:

using System.Configuration;
Run Code Online (Sandbox Code Playgroud)

然后在我的代码中:

string primary_adrs_key =  ConfigurationManager.AppSettings["PrimaryAddressK"];
Run Code Online (Sandbox Code Playgroud)

但我得到错误:

"ConfigurationManager的名称在当前上下文中不存在"

为什么?我错过了什么?

Saj*_*ran 12

读取 ConfigurationManager

在项目中添加引用System.Configuration.dll