0

我实现了 aws cognito 身份并同步到我的 xamarin.forms 项目中。在android上一切正常。我想试试 uwp 应用程序。立即我得到了一个例外,如下所示。这是否意味着 AWS 不支持 Pcl 实现,但应该通过依赖注入天真地实现和引用它?

    AWSSDK.Core.dll but was not handled in user code

    Additional information: This functionality is not implemented in the
 portable version of this assembly.

     You should reference the AWSSDK.Core NuGet package from your main 
application project in order to reference the platform-specific implementation.

我为 uwp 和 XF 项目安装了以下 nuget

在此处输入图像描述

4

1 回答 1

1

立即我得到了一个例外,如下所示。

当您添加 nuget 包时,Nuget 会安装不同版本的 dll。(您可以在 下找到它们C:\Users\<username>\.nuget\packages\AWSSDK.Core\<version>\lib)。并且取决于您的项目类型,nuget 决定应该为您的项目引用哪个 dll。从错误消息中,您当前使用的功能不包含在便携版 dll 中。

这是否意味着 AWS 不支持 Pcl 实现,但应该通过依赖注入天真地实现和引用它?

是的。由于 Pcl 版本的 dll 不具备此功能,因此您需要使用依赖注入在本机实现它。

于 2016-12-07T01:57:57.517 回答