微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

vb.net – 无法导入`Imports System.Web.Script.Serialization`

当我尝试Imports System.Web.Script.Serialization时,我在VB 2010中遇到一个错误

Warning: Namespace or type specified in the Imports System.Web.Script.Serialization doesn’t contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn’t use any aliases.

不知道为什么我不能导入它.

解决方法

您可能缺少对System.Web.Extensions.dll的程序集引用.将此引用添加到项目中,然后重试.

一般来说,当您遇到此问题时,请转到您要使用的类型的.NET API参考页面 – 例如,JavaScriptConverter – 并查看命名空间和程序集提示(确保您正在查看页面您正在使用的.NET框架版本:

>命名空间:告诉您在Imports指令中放入什么.>汇编:告诉您需要在项目中引用的汇编(例如,转到解决方案资源管理器,找到引用,然后从上下文菜单中选择添加引用…).

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐