asp.net - System.Configuration.ConfigurationSection 在类库下不可用

标签 asp.net vb.net configurationsection

我正在将一个功能从我的 App_Code 目录迁移到一个单独的项目,该项目将构建一个类库以供我的 Web 应用程序引用。我在 App_Code 片段中的一个类继承了 System.Configuration.ConfigurationSection,如下所示:

Imports System.Configuration
Imports System.Web.Configuration
Imports Microsoft.VisualBasic

Namespace P10.WebStore

#Region "WebStore Section"
    Public Class WebStoreSection
        Inherits ConfigurationSection

我绝对无法让项目将 ConfigurationSection 识别为一个类。我在谷歌上没有提到必须做任何特别的事情才能使用它。是因为这是一个类库而不是 .exe 或其他东西吗?我难住了。

最佳答案

型号 ConfigurationSection 在程序集中找到 System.Configuration .您是否在类库项目中添加了对该程序集的引用?

关于asp.net - System.Configuration.ConfigurationSection 在类库下不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2747399/

相关文章:

asp.net - 什么时候Response.IsClientConnected慢?

asp.net - 发布 ASP.net 看不到程序集

jquery - 在asp.net mvc 3项目中渲染部分 View onclick

.net - 使 DLL COM 可访问

sql-server - SQL查询对datagridview返回0

c# - ASP.Net:写文件 block ..HTTP文件上传简历

.net - 在运行时创建或编辑自定义配置部分

.net - 与 ConfigurationProperty 属性一起使用时,属性类型的隐式约定是什么?

javascript - 如何下载网页组件?