找不到命名空间“System.Data.SqlServerCe" [英] Cannot find namespace 'System.Data.SqlServerCe'

查看:26
本文介绍了找不到命名空间“System.Data.SqlServerCe"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实包含了 System.Data.SqlServerCe dll,将 using System.Data.SqlServerCe; 放在我的代码中,但是当我打开 .NET 页面时,我得到:

I did include the System.Data.SqlServerCe dll, put using System.Data.SqlServerCe; in my code, but when I open the .NET page I get:

类型或命名空间名称SqlServerCe"不存在于命名空间System.Data"(您是否缺少程序集引用?)

The type or namespace name 'SqlServerCe' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

我不知道如何解决这个问题.提前致谢.

I have nave no idea how to fix this. Thanks in advance.

推荐答案

这可以通过确认以下2点来解决:

This can be solved confirming following 2 points:

  1. 检查您是否已经将 System.Data.SqlServerCe 命名空间添加到应用程序的 References 文件夹.如果它不在你可以右键单击引用"文件夹并选择添加引用选项.从弹出窗口转到 .Net 标签 并选择System.Data.SqlServerCe 并单击确定"将命名空间添加到项目.
  2. 如果您对第 1 步没问题,请将 using System.Data.SqlServerCe; 添加到您的代码隐藏文件的顶部使用System.Data.SqlServerCe 命名空间.
  1. Check whether you already have System.Data.SqlServerCe namespace added to the References folder of your application. If its not there you may right click the References folder and select Add references option. From the popup window go to .Net tab and select System.Data.SqlServerCe from the list and click OK to add the namespace to the project.
  2. If you are OK with step 1, add using System.Data.SqlServerCe; to the top of your code behind file which uses the System.Data.SqlServerCe namespace.

这篇关于找不到命名空间“System.Data.SqlServerCe"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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