【问题标题】:Error after upgrading from DNN 7.0 to 7.4.1 (Version Upgrade package)从 DNN 7.0 升级到 7.4.1 后出错(版本升级包)
【发布时间】:2015-06-12 17:59:44
【问题描述】:

完成对 DNN 7.4 的升级后,我收到下面概述的错误。一切顺利,安装日志中没有错误。这发生在任何页面上,并且我认为对 Visual Studio 没有新的依赖项......

2015-06-12 17:43:49,567 [scrumorg-stage][Thread:5][ERROR] DotNetNuke.Common.Internal.EventHandlersContainer`1[[DotNetNuke.Services.FileSystem.IFileEventHandlers, DotNetNuke, Version=7.4.1.280, Culture=neutral, PublicKeyToken=null]] - The type initializer for 'DotNetNuke.ExtensionPoints.ExtensionPointManager' threw an exception.
System.TypeInitializationException: The type initializer for 'DotNetNuke.ExtensionPoints.ExtensionPointManager' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   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.ModuleHandle.ResolveTypeHandle(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.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Int32 attributeCtorToken, Boolean mustBeInheritable)
   at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.ComponentModel.Composition.AttributedModel.AttributedPartCreationInfo.IsPartDiscoverable()
   at System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement origin)
   at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal()
   at System.ComponentModel.Composition.Hosting.TypeCatalog.GetEnumerator()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at DotNetNuke.ExtensionPoints.SafeDirectoryCatalog..ctor(String directory)
   at DotNetNuke.ExtensionPoints.ExtensionPointManager.InitializeMefCompositionContainer()
   at DotNetNuke.ExtensionPoints.ExtensionPointManager..cctor()
   --- End of inner exception stack trace ---
   at DotNetNuke.ExtensionPoints.ExtensionPointManager.ComposeParts(Object[] attributeParts)
   at DotNetNuke.Common.Internal.EventHandlersContainer`1..ctor()

任何想法我缺少什么或可能发生什么?

【问题讨论】:

  • 您是否尝试在 web.config 文件中注释该程序集引用?
  • 尝试下载 7.4.1 的安装包并将 web.config 从 zip 包中提取出来。使用文本比较工具将其与您现有的 web.config 进行比较。我在过去的升级中看到过错误,这是因为 web.config 中缺少部分。
  • 好建议!我从安装版本中获取了 web.config,除了更新连接字符串和机器密钥之外什么也没做......仍然导致上述错误。奇怪的是,这个错误是指 mstest,我想知道这个发行版是否有问题?

标签: dotnetnuke dotnetnuke-7


【解决方案1】:

所以这个问题最终是在 Ryan 正在升级的 DNN 网站的 BIN 文件夹中找到的自定义 DLL。

我解决这个问题的非科学方法是:

  1. 在 BIN 文件夹中批量删除 DLL(保留 DLL 的副本,因为您不确定哪个是问题所在,测试后将它们放回去)
  2. 加载网站(使用管理员/网站设置页面)
  3. 查看页面是否仍然错误,如果是,请重复步骤 1 和 2

最终导致问题的 DLL 是我相信用于测试的 webservice/api URL。删除它更正了他们正在使用的 DNN 7.3.4 实例上的问题。

【讨论】:

  • 感谢克里斯发布答案!
  • 具体来说,单元测试进入生产程序集并被部署(连同它对 MS 测试的引用)。该错误很难追踪,因为抛出的 MEF 错误不是特定于程序集的......它实际上是任意数量的程序集。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-06-17
  • 2021-11-16
相关资源
最近更新 更多