Windows Phone 8.1无法引用System.Data [英] Windows phone 8.1 can't reference System.Data

查看:73
本文介绍了Windows Phone 8.1无法引用System.Data的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建Windows Phone 8.1应用程序,该应用程序可以访问本地数据库。我想在可移植类库中处理数据库访问。
作为介绍,我浏览了以下网页:
https://msdn.microsoft.com/de-de/library/windows/apps/hh202876(v = vs.105).aspx

I'm trying to create a windows phone 8.1 apllication which has access to a local Database. I want to handle the DB acess in a portable class library. For introduction I looked as this webpage: https://msdn.microsoft.com/de-de/library/windows/apps/hh202876(v=vs.105).aspx

但是我什至无法引用所需的名称空间:

But I can't even reference the required namespaces:

using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.ComponentModel;
using System.Collections.ObjectModel;

而且我也无法添加其中任何一个作为参考。
有人可以告诉我怎么了吗

And also I can't add none of them as reference. Can someone tell me whats wrong

推荐答案

您不能使用 SqlClient 在PCL项目中,因为它不是作为PCL构建的,也不是跨平台的。 Data 命名空间在PCL项目中不可用,并且未列出此处

You can not use SqlClient in PCL projects because it is not built as a PCL and it is not cross platform. The Data namespace is unavailable in PCL projects and it is not listed here.

可移植类库项目中提供以下程序集:

The following assemblies are available within a Portable Class Library project:



  • 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(来自Silverlight )

  • 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无法引用System.Data的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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