问题描述
我有一个Xamarin表单移动项目(Android和iOS).
I have a Xamarin forms mobile project (Android and iOS).
当我尝试安装AWSSDK.S3以访问Amazon服务时,尝试构建iOS时出现以下链接器错误:
When I try to install the AWSSDK.S3 to access Amazon services, I get the following linker error when trying to build iOS:
无法从"AWSSDK.Core,"解析"System.Void Amazon.Runtime.Internal.Util.AESEncryptionPutObjectStream ::.ctor(System.IO.Stream,System.Byte [],System.Byte [])"引用版本= 3.3.0.0,文化=中性,PublicKeyToken = 885c28607f98e604"
Failed to resolve "System.Void Amazon.Runtime.Internal.Util.AESEncryptionPutObjectStream::.ctor(System.IO.Stream,System.Byte[],System.Byte[])" reference from "AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604"
.. Android版本也有类似的错误.
..Android build has a similar error.
我安装了以下库:
AWSSDK.S3 v3.1.1.1AWSSDK.Core v3.3.4AWSSDK.SecurityToken v3.3.0.2AWSSDK.CognitolIdenity v3.3.0.2AWSSDK.CognitoIdentityProvider v3.3.1.2PCLCrypto v2.0.147PCLStorage v1.0.2
AWSSDK.S3 v3.1.1.1AWSSDK.Core v3.3.4AWSSDK.SecurityToken v3.3.0.2AWSSDK.CognitolIdenity v3.3.0.2AWSSDK.CognitoIdentityProvider v3.3.1.2PCLCrypto v2.0.147PCLStorage v1.0.2
我的项目中唯一的代码是:
the only code in my project is:
var amazonClient = new AmazonS3Client();
有什么想法吗?
推荐答案
在这里找到答案:
Xamarin Forms IOS无法加载程序集System.Net.Http.Primitive
尽管其组装错误不同,但修复方法是相同的:
even though its a different assembly error, the fix is the same:
- 将所有AWS.Core更新为最新版本:就我而言为v3.3.6
- 安装Microsoft.Bcl.Build v1.0.21
- 安装Microsoft.Net.Http v2.2.29
这篇关于AWSSDK的Xamarin链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!