rickthehat
rickthehat

Reputation: 77

imageresizer latest nuget update having issues with s3

I have uninstalled the AWS package, then the Imageresizer package. Flipped them around as far as installation but still get the same issue.

Obviously, when I don't have the S3 plugin loaded it work so anymore things I should try here?

Method not found: 'Void    Amazon.S3.AmazonS3Config.set_CommunicationProtocol(Amazon.S3.Model.Protocol)'. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.MissingMethodException: Method not found: 'Void Amazon.S3.AmazonS3Config.set_CommunicationProtocol(Amazon.S3.Model.Protocol)'.

Source Error: 

 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 

[MissingMethodException: Method not found: 'Void Amazon.S3.AmazonS3Config.set_CommunicationProtocol(Amazon.S3.Model.Protocol)'.]
   ImageResizer.Plugins.S3Reader.S3Reader..ctor(NameValueCollection args) +0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +190
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1136
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +128
   System.Activator.CreateInstance(Type type, Object[] args) +19
   ImageResizer.Configuration.PluginConfig.CreatePluginByType(Type t, NameValueCollection args) +1153
   ImageResizer.Configuration.PluginConfig.CreatePluginByName(String name, NameValueCollection args) +88
   ImageResizer.Configuration.PluginConfig.add_plugin_by_name(String name, NameValueCollection args) +63
   ImageResizer.Configuration.PluginConfig.loadPluginsInternal() +402
   ImageResizer.Configuration.PluginConfig.LoadPlugins() +102
   ImageResizer.Configuration.Config..ctor(ResizerSection config) +546
   ImageResizer.Configuration.Config.get_Current() +115
   ImageResizer.InterceptModule.get_conf() +36
   ImageResizer.InterceptModule.System.Web.IHttpModule.Init(HttpApplication context) +250
   System.Web.HttpApplication.InitModulesCommon() +80
   System.Web.HttpApplication.InitModules() +64
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +792
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +336
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +525

Upvotes: 0

Views: 496

Answers (3)

Lilith River
Lilith River

Reputation: 16468

We've released ImageResizer 3.4.2, which fixes this problem with S3Reader - and also includes S3Reader2 which works with the newly revamped AWSSDK 2.0.


Until we release 3.4.2, you'll need to manually specify the AWSSDK nuget package in packages.config to keep it from installing the 2.0 beta:

<package id="AWSSDK" targetFramework="net45" allowedVersions="(,2.0)"></package>

Upvotes: 0

leonfs
leonfs

Reputation: 719

The current (3.4.1) S3Reader plugin is not compatible with the AWSSDK 2.* version.

Go to the Package Manager:

1) Uninstall S3Reader plugin

Uninstall-Package ImageResizer.Plugins.S3Reader -ProjectName YourProjectName

2) Uninstall AWSSDK

Uninstall-Package AWSSDK -ProjectName YourProjectName

3) Install AWSSDK 1.5.* version (at the moment the latest is 1.5.39.0)

Install-Package AWSSDK -ProjectName YourProjectName -Version 1.5.39.0

4) Install S3Reader plugin ignoring the dependencies

Install-Package ImageResizer.Plugins.S3Reader -ProjectName YourProjectName-IgnoreDependencies

That should fix your problem!! Cheers...

Upvotes: 1

Tej Kiran
Tej Kiran

Reputation: 2238

The error showing that this method is missing or not found "Void Amazon.S3.AmazonS3Config.set_CommunicationProtocol(Amazon.S3.Model.Protocol)"

Check your sdk and is there lib path is not correct.

Upvotes: 0

Related Questions