Sitecore包设计器“无法加载一个或多个请求的类型”

时间:2014-07-28 15:05:02

标签: asp.net visual-studio sitecore sitecore6

我正在运行我的Sitecore(Sitecore.NET 6.5.0(rev.120706))网站的本地版本,我有这些CMS更改,我想用软件包设计器打包。当我转到包设计器时,我收到此错误消息:

  

' /'中的服务器错误应用

     

无法加载一个或多个请求的类型。检索   LoaderExceptions属性以获取更多信息。

     

描述:执行期间发生了未处理的异常   当前的网络请求。请查看堆栈跟踪了解更多信息   有关错误的信息以及它在代码中的起源。

     

异常详细信息:System.Reflection.ReflectionTypeLoadException:   无法加载一个或多个请求的类型。检索   LoaderExceptions属性以获取更多信息。

     

来源错误:

     

执行期间生成了未处理的异常   当前的网络请求。有关的来源和位置的信息   可以使用下面的异常堆栈跟踪来识别异常。

     

堆栈追踪:

     

[ReflectionTypeLoadException:无法加载一个或多个   要求的类型。检索LoaderExceptions属性以获取更多信息   信息]
  System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)+0
  System.Reflection.RuntimeModule.GetTypes()+9
  System.Reflection.Assembly.GetTypes()+ 143 3   Sitecore.Shell.Applications.Install.Commands.Commands.Init()+ 63

     

[TypeInitializationException:类型初始值设定项   ' Sitecore.Shell.Applications.Install.Commands.Commands'扔了一个   例外]
  Sitecore.Shell.Applications.Install.Commands.Commands.Init()+ 0

     

[TargetInvocationException:目标抛出了异常   一个调用。] System.RuntimeMethodHandle.InvokeMethod(Object   target,Object []参数,签名sig,布尔构造函数)+0
  System.Reflection.RuntimeConstructorInfo.Invoke(的BindingFlags   invokeAttr,Binder binder,Object []参数,CultureInfo文化)   +639 Sitecore.Reflection.ReflectionUtil.CreateObject(Type type,Object [] parameters)+110
  Sitecore.Web.UI.HtmlControls.CodeBeside.CreateCodeBeside(String type)   +35 Sitecore.Web.UI.HtmlControls.CodeBeside.OnInit(EventArgs e)+114 System.Web.UI.Control.InitRecursive(Control namingContainer)+186 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System .Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI。 Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Control.InitRecursive(Control namingContainer)+421 System.Web.UI.Control.AddedControl(控制控件,Int32索引)+189 Sitecore.Shell.DefaultPage.OnInit(EventArgs e)+197
  System.Web.UI.Control.InitRecursive(Control namingContainer)+186
  System.Web.UI.Page.ProcessRequestMain(布尔   includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)   2098

     

版本信息:Microsoft .NET Framework版本:4.0.30319;   ASP.NET版本:4.0.30319.34009

我试图弄清楚这个错误是什么,我的日志文件对我没什么帮助。我与我的现场网站(完美地运行包装设计师)进行了比较,它们完全相同。

我应该寻找什么来找到这个问题的原因?

2 个答案:

答案 0 :(得分:2)

看起来有一个命令引用了您的设置中缺少的程序集。将本地程序集与实际站点的程序集进行比较,并检查 /App_Config/Commands.config 以获取自定义命令或对自定义程序集的引用。

答案 1 :(得分:1)

在引用时,它实际上可能是不匹配的dll和清单条目的组合。 它也可能是Newtonsoft.Json.dll。

请转到您应用的根级别的web.config。

及以下



<dependentAssembly>
       <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>

</runtime>
&#13;
&#13;
&#13;

修复所有