更新时间:2022-08-17 10:14:32
需要先引用DLL文件:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll
然后才可以使用
System.Configuration.ConfigurationManager.AppSettings["SiteUrl"]
在类库中无法使用ConfigurationManager
无法使用ConfigurationManager.AppSettings读取Web.config
是否需要在类库中部署 XML 文件?
Log4net在类库中的用法