Migrate Microsoft.WindowsAzure.Mobile.SQLStore to Microsoft.



我正在尝试使用新的Microsoft.Azure.Mobile.Client.SQLiteStore软件包更新我的Xamarin.Forms应用程序之一,该应用程序使用已弃用的Microsoft.WindowsAzure.Mobile.SQLStore pacakge,但是当我尝试在我的Core pcl项目中安装该软件包时,我收到以下错误:

Could not install package 'Microsoft.Azure.Mobile.Client.SQLiteStore 4.0.0'. 
You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', 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.

我试图遵循此文档,但他们似乎忘记添加代码示例,所以我无法确切地弄清楚他们在做什么。已弃用的Microsoft.WindowsAzure.Mobile.SQLStore软件包安装在PCL库中,但新的Microsoft.Azure.Mobile.Client.SQLiteStore软件包似乎没有。

任何帮助将不胜感激。

事实证明,Microsoft.Azure.Mobile.Client.SQLiteStore 4.0.0 不再支持 PCL,但他们迁移到了 .NET Standard 1.4。PCL 支持在版本 3.1.0 停止

因此,如果您使用的是 PCL,请安装 v3.1.0。但在安装 v3.1.0 之前,请确保先手动删除已弃用的 Microsoft.WindowsAzure.Mobile.SQLStore。

有关更多详细信息,请查看此问题:https://github.com/Azure/azure-mobile-apps-net-client/issues/337

你可以

尝试打开PCL的.csproj,并将Profile78条目替换为NuGet包支持的配置文件(可能Profile259它包括除Windows Phone silverlight之外的几乎所有内容(

如果您的项目在更改配置文件后无法编译(例如,因为缺少类型引用(,请尝试选择包支持的其他配置文件。

如果你有多个 PCL,则可能需要更改所有 PCL 的目标配置文件。

尝试将 .Net 配置文件更改为配置文件 7,然后更新。转到跨平台项目选项->生成>常规->.Net 可移植

相关内容

最新更新