【问题标题】:Cannot instell System.data.sqlClient in Visual Studio Xamarin project无法在 Visual Studio Xamarin 项目中安装 System.data.sqlClient
【发布时间】:2017-05-03 21:27:14
【问题描述】:

我之前问过一个关于 azure 数据库的问题,并得到了一个有用的解决方案,但是要使用该解决方案,我需要安装 System.Data.SqlClient。我尝试从 microsoft 安装 NuGet 包,但每当我这样做时,我都会收到以下错误。我真的很感激这方面的一些帮助。该项目是一个使用 xamarin.forms 和可移植类库的跨平台应用程序。我正在尝试将其安装到 Appname(portable) 因为那是我的脚本所在的位置。谢谢。

Severity    Code    Description Project File    Line    Suppression State
Error       Could not install package 'System.Data.SqlClient 4.3.0'. 
You are trying to install this package into a project that targets '.NETPortable,
Version=v4.5,Profile=Profile259', but the package does not contain any assembly references 
or content files that are compatible with that framework. For more information, 
contact the package author.         0   

【问题讨论】:

    标签: visual-studio xamarin installation cross-platform system.data


    【解决方案1】:

    来自http://portablelibraryprofiles.stephencleary.com/,profile259 不支持 system.data.sqlclient。它里面有windows phone。
    配置文件适用于 .NET Framework 4.5、Windows 8.0、Windows Phone 8.1、Windows Phone Silverlight 8.0。

    更大的图景是 Xamarin 和移动客户端无法直接访问 sql server。使用 webapi 等构建服务外观......请参阅https://blog.xamarin.com/developing-enterprise-apps-using-xamarin-forms 了解一些想法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-09
      • 1970-01-01
      • 2021-04-03
      • 1970-01-01
      • 2019-01-30
      相关资源
      最近更新 更多