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 引用


- 在 LINQ to SQL 中使用 contains() 2022-01-01
- Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? 2022-01-01
- C# 通过连接字符串检索正确的 DbConnection 对象 2022-01-01
- 是否可以在 .Net 3.5 中进行通用控件? 2022-01-01
- CanBeNull和ReSharper-将其用于异步任务? 2022-01-01
- Azure Active Directory 与 MVC,客户端和资源标识同一 2022-01-01
- 为什么 C# 中的堆栈大小正好是 1 MB? 2022-01-01
- 在 C# 中异步处理项目队列 2022-01-01
- 使用 rss + c# 2022-01-01
- 带问号的 nvarchar 列结果 2022-01-01