Sébastien Richer
Sébastien Richer

Reputation: 1691

Sitecore package designer "Unable to load one or more of the requested types"

I'm running this local version of my Sitecore (Sitecore.NET 6.5.0 (rev. 120706)) website and I have these CMS changes that I want to package up with the package designer. When I go to the package designer I get this error message:

Server Error in '/' Application.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +9
System.Reflection.Assembly.GetTypes() +143
Sitecore.Shell.Applications.Install.Commands.Commands.Init() +63

[TypeInitializationException: The type initializer for 'Sitecore.Shell.Applications.Install.Commands.Commands' threw an exception.]
Sitecore.Shell.Applications.Install.Commands.Commands.Init() +0

[TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +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(Control control, Int32 index) +189 Sitecore.Shell.DefaultPage.OnInit(EventArgs e) +197
System.Web.UI.Control.InitRecursive(Control namingContainer) +186
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2098

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009

I tried to figure out what this error is, my log files don't really help me. I compared with my live site (which runs the package designer perfectly) and they are pretty much identical.

What should I look for to find the cause of this problem?

Upvotes: 2

Views: 3327

Answers (2)

Sen Gupta
Sen Gupta

Reputation: 11

It is may be actually a combination of mismatched dll's and manifest entries while referencing. It could be Newtonsoft.Json.dll as well.

Please go to web.config at root level of your app.

and under

<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>

Fixes all

Upvotes: 1

Mark Lowe
Mark Lowe

Reputation: 1076

It looks like there is a command referencing an assembly which is missing in your setup. Compare your local assemblies with the ones of your live site and check your /App_Config/Commands.config for custom commands or references to custom assemblies.

Upvotes: 2

Related Questions