System.TypeLoadException:" ImageResizer.Util.BundleAttribute"

时间:2016-02-15 21:45:51

标签: imageresizer

我尝试将ImageResizer v3迁移到v4。升级后我无法调用ImageResizer甚至不支持页面。支持页面错误是:

[TypeLoadException: Der Typ "ImageResizer.Util.BundleAttribute" in der Assembly "ImageResizer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" konnte nicht geladen werden.]
   System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
   System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +191
   System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +162
   System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +148
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +604
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +144
   System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) +111
   System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +17
   System.Reflection.CustomAttributeExtensions.GetCustomAttribute(Assembly element) +60
   ImageResizer.Plugins.Basic.DiagnosticPageHandler.GenerateOutput(HttpContext context, Config c) +943
   ImageResizer.Plugins.Basic.DiagnosticPageHandler.ProcessRequest(HttpContext context) +168
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +904
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +98

我该如何解决?我卸载了模块并重新安装但没有运气:

ImageResizer.4.0.5
ImageResizer.Plugins.TinyCache.4.0.5

1 个答案:

答案 0 :(得分:0)

您已从ImageResizer v3中留下一个或多个插件。您不能将v3插件与v4 ImageResizer.dll一起使用。