如何将System.Data.SqlserverCe.dll添加到VS2010中的Windows Mobile 7.1项目中

如何将System.Data.SqlserverCe.dll添加到VS2010中的Windows Mobile 7.1项目中

问题描述:

我已经安装了SQL Server compact 3.5并创建了数据库sdf。但是,当我尝试将System.Data.SqlServerCe.dll添加到引用。我看到以下错误。 enter image description here如何将System.Data.SqlserverCe.dll添加到VS2010中的Windows Mobile 7.1项目中

.NET列中没有sqlservece.dll,因此我尝试了C:\ Program Files(x86)\ Microsoft SQL Server Compact Edition \ v3.5文件夹中的每个System.Data.SqlServerCE.dll文件。但错误消息仍然存在。

如何解决这个问题?

您只能在Windows Phone上使用LINQ to SQL api访问SQL Compact。如果你想包含一个现有的数据库,这是可能的。详情请看我的博客文章:

http://erikej.blogspot.dk/2013/04/generate-windows-phone-8-local-database.html