Windows phone 8.1 无法引用 System.Data
Windows phone 8.1 can't reference System.Data
我正在尝试创建一个 windows phone 8.1 应用程序,它可以访问本地数据库。我想在便携式 class 库中处理数据库访问。
为了介绍我看了这个网页:
https://msdn.microsoft.com/de-de/library/windows/apps/hh202876(v=vs.105).aspx
但我什至无法引用所需的命名空间:
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.ComponentModel;
using System.Collections.ObjectModel;
而且我无法将其中的 none 添加为参考。
谁能告诉我怎么了
您不能在 PCL 项目中使用 SqlClient
,因为它不是作为 PCL 构建的,也不是跨平台的。 Data
命名空间在 PCL 个项目中不可用,并且未列出 here。
便携式 Class 库项目中提供了以下程序集:
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)
我正在尝试创建一个 windows phone 8.1 应用程序,它可以访问本地数据库。我想在便携式 class 库中处理数据库访问。 为了介绍我看了这个网页: https://msdn.microsoft.com/de-de/library/windows/apps/hh202876(v=vs.105).aspx
但我什至无法引用所需的命名空间:
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.ComponentModel;
using System.Collections.ObjectModel;
而且我无法将其中的 none 添加为参考。 谁能告诉我怎么了
您不能在 PCL 项目中使用 SqlClient
,因为它不是作为 PCL 构建的,也不是跨平台的。 Data
命名空间在 PCL 个项目中不可用,并且未列出 here。
便携式 Class 库项目中提供了以下程序集:
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)