【发布时间】:2012-11-12 17:01:39
【问题描述】:
我的问题很简单。我有一个第三方库,它假定它将在网站中使用(需要 web.config 中的特殊配置部分)。我想在 C# 控制台应用程序中使用这个库。有可能的?
我试过了
WebConfigurationManager.OpenWebConfiguration();
以及将所有内容复制到 app.config 中,但它不起作用。我收到的错误是 ConfigurationErrorsException 说明
An error occurred creating the configuration section handler for ...: Could not load type 'Configuration.RenderingSection' from assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
【问题讨论】:
标签: c# web-applications configuration console-application