I recently revived a project in Mono we haven't used in a while. One of the first things I did was upgrade our shared code, which contained the AWSSDK for .NET nuget package (on version 2.0.11). Our version of the Nuget package was also updated.
However now on the target machine I'm seeing the code throw an exception trying to resolve System.Net.Http.Webrequest, which should exist and be supported in Mono. I even tried pulling the AWSSDK code from Git and building in Xamarin, and it builds fine, but at runtime my code fails to resolve the dependency inside the AWS SDK call.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Amazon.Runtime.AmazonWebServiceClient.Initialize () [0x00000] in <filename unknown>:0
at Amazon.Runtime.AbstractWebServiceClient..ctor (Amazon.Runtime.AWSCredentials credentials, Amazon.Runtime.ClientConfig config, AuthenticationTypes authenticationType) [0x00000] in <filename unknown>:0
at Amazon.Runtime.AmazonWebServiceClient..ctor (System.String awsAccessKeyId, System.String awsSecretAccessKey, Amazon.Runtime.ClientConfig config, AuthenticationTypes authenticationType) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client..ctor (System.String awsAccessKeyId, System.String awsSecretAccessKey, Amazon.S3.AmazonS3Config clientConfig) [0x00000] in <filename unknown>:0
at Core.Amazon.S3.S3File..ctor () [0x00000] in <filename unknown>:0
at LitmusMono.WebmailMonoTestingService..ctor () [0x00000] in <filename unknown>:0
at LitmusMono.ServiceStarter.InitTestingServices () [0x00000] in <filename unknown>:0
Could not load file or assembly 'System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
at Amazon.Runtime.AmazonWebServiceClient.Initialize () [0x00000] in <filename unknown>:0
at Amazon.Runtime.AbstractWebServiceClient..ctor (Amazon.Runtime.AWSCredentials credentials, Amazon.Runtime.ClientConfig config, AuthenticationTypes authenticationType) [0x00000] in <filename unknown>:0
at Amazon.Runtime.AmazonWebServiceClient..ctor (System.String awsAccessKeyId, System.String awsSecretAccessKey, Amazon.Runtime.ClientConfig config, AuthenticationTypes authenticationType) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client..ctor (System.String awsAccessKeyId, System.String awsSecretAccessKey, Amazon.S3.AmazonS3Config clientConfig) [0x00000] in <filename unknown>:0
Some notes: The release configuration I'm using is forcing x86 build because one of my child projects is x86.
The target platform for the program to run is OSX with Mono 3.0.4 beta.