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 引用
基础教程推荐
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
