首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >imageresizer最新的nuget更新与s3有问题

imageresizer最新的nuget更新与s3有问题
EN

Stack Overflow用户
提问于 2013-11-25 05:06:33
回答 3查看 461关注 0票数 0
  • 我终于有时间更新我的mvc应用程序(Mvc 5,EF 6,Web 2等)。现在唯一不起作用的是AWS + Imageresizer的最新版本,如您所见,下面是我得到的错误消息*

我已经卸载了AWS包,然后是Imageresizer包。把它们翻转到安装的地方,但仍然有同样的问题。

显然,当我没有加载S3插件时,它可以工作,所以我应该在这里尝试更多的东西?

代码语言:javascript
复制
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
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-11-25 21:09:16

我们已经发布了ImageResizer 3.4.2,它用S3Reader解决了这个问题--还包括S3Reader2,它与新修改的AWSSDK2.0一起工作。

在我们发布3.4.2之前,您需要在packages.config中手动指定AWSSDK包,以防止它安装2.0测试版:

代码语言:javascript
复制
<package id="AWSSDK" targetFramework="net45" allowedVersions="(,2.0)"></package>
票数 0
EN

Stack Overflow用户

发布于 2013-11-25 12:34:55

当前(3.4.1) S3Reader插件与AWSSDK2.*版本不兼容。

转到包管理器:

1)卸载S3Reader插件

卸载包ImageResizer.Plugins.S3Reader -ProjectName YourProjectName

2)卸载AWSSDK

卸载包AWSSDK -ProjectName YourProjectName

3)安装AWSSDK1.5.*版本(目前最新版本为1.5.39.0)

安装包AWSSDK -ProjectName YourProjectName -Version 1.5.39.0

4)安装S3Reader插件时忽略依赖项

Install ImageResizer.Plugins.S3Reader -ProjectName YourProjectName-IgnoreDependencies

那应该能解决你的问题!!干杯..。

票数 1
EN

Stack Overflow用户

发布于 2013-11-25 07:24:03

显示此方法丢失或找不到"Void Amazon.S3.AmazonS3Config.set_CommunicationProtocol(Amazon.S3.Model.Protocol)“”的错误。

检查您的sdk,库路径是否不正确。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20185128

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档