本文介绍了找不到命名空间“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"(您是否缺少程序集引用?)
我不知道如何解决这个问题.提前致谢.
I have nave no idea how to fix this. Thanks in advance.
推荐答案
这可以通过确认以下2点来解决:
This can be solved confirming following 2 points:
- 检查您是否已经将
System.Data.SqlServerCe
命名空间添加到应用程序的 References 文件夹.如果它不在你可以右键单击引用"文件夹并选择添加引用选项.从弹出窗口转到 .Net 标签 并选择System.Data.SqlServerCe
并单击确定"将命名空间添加到项目. - 如果您对第 1 步没问题,请将
using System.Data.SqlServerCe;
添加到您的代码隐藏文件的顶部使用System.Data.SqlServerCe 命名空间.
- Check whether you already have
System.Data.SqlServerCe
namespace added tothe References folder of your application. If its not there youmay right click the References folder and select Add referencesoption. From the popup window go to .Net tab and selectSystem.Data.SqlServerCe
from the list and click OK to add the namespace to theproject. - If you are OK with step 1, add
using System.Data.SqlServerCe;
tothe top of your code behind file which uses theSystem.Data.SqlServerCe namespace.
这篇关于找不到命名空间“System.Data.SqlServerCe"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!