raol / amazon-sqs-net-extended-client-lib

Extension to Amazon SQS that adds support for sending and receiving messages greater than 256K
Apache License 2.0
39 stars 33 forks source link

Method 'AuthorizeS3ToSendMessage' does not have an implementation assembly error #10

Closed mungovan closed 6 years ago

mungovan commented 6 years ago

I'm able to successfully install the nuget package and have added the code to the project. However I'm getting this runtime error:

One or more errors occurred. | System.AggregateException: One or more errors occurred. ---> System.TypeLoadException: Method 'AuthorizeS3ToSendMessage' in type 'Amazon.SQS.ExtendedClient.AmazonSQSExtendedClient' from assembly 'Amazon.SQS.ExtendedClient, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

I'm using it like this:

AmazonS3Client s3Client = new AmazonS3Client(sessionCredentials, amazonS3config);
AmazonSQSClient sqsClient = new AmazonSQSClient(sessionCredentials, amazonSQSConfig);

AmazonSQSExtendedClient extendedClient = new AmazonSQSExtendedClient(sqsClient, new ExtendedClientConfiguration().WithLargePayloadSupportEnabled(s3Client, "my-bucket"));

The project that's referencing the extended client targets .NET Framework 4.6.2

And it has all the latest versions of: AWSSDK.Core AWSSDK.S3 AWSSDK.SQS Newtonsoft.Json

CORRECTION: Earlier I had said that the project using the extension client was targeting .netcore.

raol commented 6 years ago

@mungovan unfortunately I'm not able to reproduce. Could you please create a repro solution and post a link to it?

niamhscullion commented 6 years ago

I'm getting the same error with the same code/setup as you.

{"Method 'AuthorizeS3ToSendMessage' in type 'Amazon.SQS.ExtendedClient.AmazonSQSExtendedClient' from assembly 'Amazon.SQS.ExtendedClient, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.":"Amazon.SQS.ExtendedClient.AmazonSQSExtendedClient"}

niamhscullion commented 6 years ago

I believe you have references on your local machine that are missing from this project, can you please check, thanks!

raol commented 6 years ago

@Nimaway I've checked and you're right. This error happens when 4.6.x is targeted. As as temporary workaround I'd suggest you using version 0.2.3

Install-Package Amazon.SQS.ExtendedClient -Version 0.2.3

I'll implement proper fix in the near future.

raol commented 6 years ago

@mungovan @Nimaway I've implemented all required changes and now the latest version of the lib can be used in >=4.5 framework