I'm going through the tutorials by AWS Mobile SDK - Xamarin Developer Guide and I want to upload a text file from my Android phone (through Xamarin) to AWS S3. These are the 2 tutorials: Setting Up the AWS Mobile SDK for .NET and Xamarin and Store and Retrieve Files with Amazon S3.
I'm using the method void Amazon.S3.Transfer.TransferUtility.Upload(string,string,string)
to upload my text file. I tried running my code but I couldn't. I run into this exception **System.MissingMethodException:** 'Method not found: void Amazon.S3.Transfer.TransferUtility.Upload(string,string,string)'
despite the fact that I have included the correct namespaces. I have confirmed that the method void Amazon.S3.Transfer.TransferUtility.Upload(string,string,string)
is found in the namespace Amazon.S3.Transfer
. Below is my code
client = new AmazonS3Client(credentials, bucketRegion);
var fileTransferUtility = new TransferUtility(client);
fileTransferUtility.Upload(_fileName, bucketName, "toDo.txt");
I've included the correct namespaces, such as using Amazon.S3;
using Amazon.S3.Transfer;
The above code works for Windows Presentation Foundation (WPF) Application, but not on Xamarin.
I've add the latest version of
- AWSSDK.Core (v3.3.107.8)
- AWSSDK.S3 (v3.3.111.9)
How do I resolve this error?
Any help is highly appreciated. Thank you so much in advance.