在类库添加System.Web.Script参考 [英] Adding System.Web.Script reference in class library

查看:168
本文介绍了在类库添加System.Web.Script参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前从我的APP_ code文件夹移动code到A类库。我已标记的几种方法与 [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 装配(位于组件>在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.

您可以在这里找到的<一个在MSDN页面顶部此信息href=\"http://msdn.microsoft.com/en-us/library/system.web.script.serialization.scriptignoreattribute.aspx\">ScriptIgnoreAttribute类。

这篇关于在类库添加System.Web.Script参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆