加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-17 07:26:07 所属栏目:百科 来源:网络整理
导读:当我尝试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 namespac
当我尝试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指令中放入什么.>汇编:告诉您需要在项目中引用的汇编(例如,转到解决方案资源管理器,找到引用,然后从上下文菜单中选择添加引用…).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读