Adding System.Web.Script reference in class library(在类库中添加 System.Web.Script 引用)
问题描述
我目前正在将代码从我的 app_code 文件夹移动到类库.我用 [System.Web.Script.Serialization.ScriptIgnore]
属性标记了几个方法.我的类库看不到这个命名空间.我的添加引用对话框看不到这个命名空间.如何正确使用类库中的这个标签?
I am currently moving code from my app_code folder to a class library. I have tagged several methods with [System.Web.Script.Serialization.ScriptIgnore]
attributes. My class library cannot see this namespace. My add references dialog cannot see this namespace. How do I properly use this tag from a class library?
这是错误:找不到类型或命名空间名称ScriptIgnoreAttribute"(您是否缺少 using 指令或程序集引用?)
推荐答案
ScriptIgnoreAttribute
类在 System.Web.Extensions.dll 程序集中(位于 Assemblies 下 >VS 参考管理器中的框架).您必须在类库项目中添加对该程序集的引用.
The ScriptIgnoreAttribute
class is in the System.Web.Extensions.dll assembly (Located under Assemblies > Framework in the VS Reference Manager). You have to add a reference to that assembly in your class library project.
您可以在 ScriptIgnoreAttribute 类.
这篇关于在类库中添加 System.Web.Script 引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在类库中添加 System.Web.Script 引用


基础教程推荐
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01