在类库中无法使用ConfigurationManager

时间:2020-12-01 07:02:19

需要先引用DLL文件:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll

然后才可以使用

System.Configuration.ConfigurationManager.AppSettings["SiteUrl"]