Windows Phone 8.1无法引用System.Data
我正在尝试创建一个可以访问本地数据库的Windows Phone 8.1 apllication。 我想在便携式类库中处理数据库访问。 为了介绍我看作这个网页: https : //msdn.microsoft.com/de-de/library/windows/apps/hh202876(v = vs105) .aspx
但我甚至无法引用所需的命名空间:
using System.Data.Linq; using System.Data.Linq.Mapping; using System.ComponentModel; using System.Collections.ObjectModel;
而且我也不能添加它们作为参考。 谁能告诉我什么是错的
您不能在PCL项目中使用SqlClient
,因为它不是作为PCL构建的,也不是跨平台的。 Data
命名空间在PCL项目中不可用, 此处未列出。
可移植类库项目中提供以下程序集:
mscorlib.dll
System.dll
System.Core.dll
System.Xml.dll
System.ComponentModel.Composition.dll
System.Net.dll
System.Runtime.Serialization.dll
System.ServiceModel.dll
System.Xml.Serialization.dll
System.Windows.dll (from Silverlight)