【发布时间】:2018-09-29 10:18:21
【问题描述】:
我有一个使用 Orchard CMS (v.1.10.2.0) 构建的网站;我开发了一个自定义模块并安装了它,它可以正常工作,就像已经安装的其他模块一样。
我的问题是,从有时开始(我不知道具体从什么时候开始),如果我尝试启用或禁用一个模块,我总是会遇到有关 JetBrains.Annotations 的错误(请参阅下面的完整堆栈)。
我无法调试站点(它发布在服务器上,它没有在我的机器上运行);任何人都知道我怎么能理解发生了什么问题?关于如何在不调试的情况下获得一些信息的任何建议? (我对果园很陌生)。
哎呀。出了点问题……抱歉 发生了未处理的异常,请求已终止。请刷新页面。如果错误仍然存在,请返回
发生了一个或多个错误。
System.AggregateException:发生一个或多个错误。 ---> System.TypeLoadException:无法从程序集“Orchard.Framework,Version=1.10.2.0,Culture=neutral,PublicKeyToken=null”加载类型“JetBrains.Annotations.UsedImplicitlyAttribute”。在 System.ModuleHandle.ResolveType(RuntimeModule 模块,Int32 typeToken,IntPtr* typeInstArgs,Int32 typeInstCount,IntPtr* methodInstArgs,Int32 methodInstCount,ObjectHandleOnStack 类型)在 System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule 模块,Int32 typeToken,RuntimeTypeHandle[] typeInstantiationHandle ] methodInstantiationContext) 在 System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) 在 System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport 范围, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedMo dule,Int32 decoratedMetadataToken,Int32 pcaCount,RuntimeType attributeFilterType,Boolean mustBeInheritable,IList derivedAttributes,Boolean isDecoratedTargetSecurityTransparent)在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType 类型,RuntimeType caType,布尔继承)在 Orchard.Environment.Extensions.ExtensionManager.GetSourceFeatureNameForType(Type type, String extensionId) at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescriptor) at Orchard.Caching.Cache
2.CreateEntry(TKey k, Func2 acquire) at Orchard.Caching.Cache2.<>c__DisplayClass3_0.<Get>b__0(TKey k) at System.Collections.Concurrent.ConcurrentDictionary2.AddOrUpdate(TKey key, Func@987654323 @3 updateValueFactory) 在 Orchard.Caching.Cache2.Get(TKey key, Func2 获取) 在 Orchard.Caching.CacheManagerExtensions.Get[TKey,TResult](ICacheManager cacheManager, TKey key, Boolean preventConcurrentCalls, Func2 acquire) at Orchard.Environment.Extensions.ExtensionManager.<LoadFeatures>b__19_0(FeatureDescriptor descriptor) at Orchard.Caching.DefaultParallelCacheContext.TaskWithAcquireContext1.Execute() at System .Linq.Parallel.ArrayMergeHelper1.ToArrayElement(Int32 index) at System.Linq.Parallel.ForAllOperator1.ForAllEnumerator1.MoveNext(TInput& currentElement, Int32& currentKey) at System.Linq.Parallel.ForAllSpoolingTask2.SpoolingWork() 在 System.Linq.Parallel.SpoolingTaskBase.Work() 在 Sy stem.Linq.Parallel.QueryTask.BaseWork(Object used) at System.Threading.Tasks.Task.Execute() --- 内部异常堆栈跟踪结束 --- 在 System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose ) 在 System.Linq.Parallel.DefaultMergeHelper2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute() at System.Linq.Parallel.MergeExecutor1.Execute[TKey](PartitionedStream2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId) at System.Linq.Parallel.PartitionedStreamMerger1.Receive[TKey](PartitionedStream2 partitionedStream) at System.Linq.Parallel.ForAllOperator1.WrapPartitionedStream[TKey](PartitionedStream2 inputStream, IPartitionedStreamRecipient1 收件人,布尔值 preferStriping , QuerySettings 设置)在 System.Linq.Parallel.UnaryQueryOperator2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream2 inputStream)在 System.Linq.Parallel.ScanQueryOperator1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 收件人)在 System.Linq.Parallel.UnaryQueryOperator2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient1 收件人)在 System.Linq .Parallel.QueryOperator1.GetOpenedEnumerator(Nullable1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings) at System.Linq.Parallel.ForAllOperator1.RunSynchronously() at System.Linq.Parallel.ArrayMergeHelper1.Execute() at System.Linq.Parallel.QueryOperator1.ExecuteAndGetResultsAsArray() at Orchard.Caching.DefaultParallelCacheContext.RunInParallel[T,TResult](IEnumerable1 source, Func2 selector) at Orchard.Environment.Extensions.ExtensionManager.LoadFeatures(IEnumerable1 featureDescriptors) 在 System.Linq.Enumerable.d__1 72.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() 在 System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 源) 在 Orchard.Modules.Controllers.AdminController.FeaturesPOST(FeaturesBulkAction bulkAction, IList1 featureIds, Nullable1 force) 在 lambda_method(Closure , ControllerBase , Object[] ) 在 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 参数) 在 System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult , ActionInvocation innerInvokeState) 在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() ---> (Inner Exception #0) System.TypeLoadException: Could not load type 'JetBrains.Annotations.UsedImplicitlyAttribute' from assembly 'Orchard.Framework, Version=1.10.2.0, Culture=neutral, PublicKeyToken=null'. at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at 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) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at Orchard.Environment.Extensions.ExtensionManager.GetSourceFeatureNameForType(Type type, String extensionId) at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescriptor) at Orchard.Caching.Cache2.CreateEntry(TKey k, Func2 acquire) at Orchard.Caching.Cache2.c__DisplayClass3_0.b__0(TKey k) 在 System.Collections.Concurrent.ConcurrentDictionary@ 987654346@2 addValueFactory, Func3 updateValueFactory) at Orchard.Caching.Cache2.Get(TKey key, Func2 acquire) at Orchard.Caching.CacheManagerExtensions.Get[TKey,TResult](ICacheManager cacheManager, TKey key, Boolean preventConcurrentCalls, Func2 获取) 在 Orchard.Environment.Extensions.ExtensionManager.b__19_0(FeatureDescriptor 描述符) 在 Orchard.Caching.DefaultParallelCacheContext.TaskWithAcquireContext1.Execute() at System.Linq.Parallel.ArrayMergeHelper1。 ToA System.Linq.Parallel.ForAllSpoolingTask 处 System.Linq.Parallel.ForAllSpoolingTask`2.SpoolingWork() 处 System.Linq.Parallel.ForAllOperator1.ForAllEnumerator1.MoveNext(TInput& currentElement, Int32& currentKey) 处的 arrayElement(Int32 索引)。 () 在 System.Linq.Parallel.QueryTask.BaseWork(对象未使用) 在 System.Threading.Tasks.Task.Execute()
【问题讨论】:
标签: orchardcms