Dotnetnuke 网站设置或主机设置页面上的DNN异常;无法加载文件或程序集';protobuf net“;

Dotnetnuke 网站设置或主机设置页面上的DNN异常;无法加载文件或程序集';protobuf net“;,dotnetnuke,protobuf-net,Dotnetnuke,Protobuf Net,我将DNN从7.0.0版升级到7.1.1版。之后,每当我在我的站点中输入DNN的页面站点设置或主机设置时,我都会收到一个异常。例外情况是: Could not load file or assembly 'protobuf-net, Version=2.0.0.447, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' or one of its dependencies. The system cannot find the file spec

我将DNN从7.0.0版升级到7.1.1版。之后,每当我在我的站点中输入DNN的页面站点设置或主机设置时,我都会收到一个异常。例外情况是:

Could not load file or assembly 'protobuf-net, Version=2.0.0.447, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' or one of its dependencies. The system cannot find the file specified.
以下是完整的内部异常:

DotNetNuke.Services.Exceptions.PageLoadException: Could not load file or assembly 'protobuf-net, Version=2.0.0.447, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' or one of its dependencies. The system cannot find the file specified. 
---> System.IO.FileNotFoundException: Could not load file or assembly 'protobuf-net, Version=2.0.0.447, Culture=neutral, PublicKeyToken=257b51d87d2e4d67' 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, Boolean mustBeInheritable) 
at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit) 
at System.ComponentModel.Composition.AttributedModel.AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement origin) 
at System.ComponentModel.Composition.Hosting.TypeCatalog.get_PartsInternal() 
at DotNetNuke.ExtensionPoints.SafeDirectoryCatalog..ctor(String directory) 
at DotNetNuke.ExtensionPoints.ExtensionPointManager.get_MefCompositionContainer() 
at DotNetNuke.ExtensionPoints.ExtensionPointManager.ComposeParts(Object[] attributeParts) 
at DotNetNuke.ExtensionPoints.EditPagePanelExtensionControl.OnInit(EventArgs e) 
at System.Web.UI.Control.InitRecursive(Control namingContainer) 
at System.Web.UI.Control.InitRecursive(Control namingContainer) 
at System.Web.UI.Control.InitRecursive(Control namingContainer) 
at System.Web.UI.Control.AddedControl(Control control, Int32 index) 
at System.Web.UI.Control.EnsureChildControls() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Control.PreRenderRecursiveInternal() 
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
我已经搜索了protobuf net和DNN的所有内容,但没有找到任何内容

有人知道这件事吗

编辑


最后,问题解决了。问题是我安装的一个模块引用了protobuf网络。模块调用。不知何故,此模块与7.0.0以上的DNN版本不兼容。我联系了模块以获取更多信息。

我完全不知道DNN是如何利用这一点的,但在最简单的层面上,您可以尝试添加对protobuf net的适当版本的引用(可能是最简单的),并查看它是否有效。这可以通过UI或package manager控制台完成:

PM> Install-Package protobuf-net
如果问题实际上是“融合”,那么绑定重定向可能会有所帮助——例如,将所有内容重定向到r668(假设您使用的是protobuf net r668):


好的,谢谢。但是,在DNN中哪里可以找到包管理器控制台?
<dependentAssembly>
  <assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67"
                    culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-2.0.0.668" newVersion="2.0.0.668" />
</dependentAssembly>