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

查看:23
本文介绍了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

推荐答案

您不能在 PCL 项目中使用 SqlClient,因为它不是作为 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)

这篇关于Windows phone 8.1 无法引用 System.Data的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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