This is a migrated thread and some comments may be shown as answers.
2011.3.1115 Upgrade - Menu error
1 Answer 40 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Geoffrey Hudik
Top achievements
Rank 1
Geoffrey Hudik asked on 16 Nov 2011, 09:33 PM
I just upgraded from 2011.2.712 to 2011.3.1115. There were no errors / issues with the upgrade process. On running though I get the below exception with the menu now:

System.Reflection.ReflectionTypeLoadException occurred
  Message=Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  Source=mscorlib
  StackTrace:
       at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
       at System.Reflection.RuntimeModule.GetTypes()
       at System.Reflection.Assembly.GetTypes()
       at Telerik.Web.Mvc.Infrastructure.Implementation.ControllerTypeCache.GetAllControllerTypes() in f:\115\Griffin\Trunk Full\Sources\Source\Telerik.Web.Mvc\Infrastructure\Implementation\ControllerTypeCache.cs:line 142
  InnerException: 

This occurs on the line:

@(Html.Telerik().Menu()
                            .Name("menu").HtmlAttributes(new {@class="menu"})
                            .BindTo("Nav") // ViewData["Nav"] contains the sitemap
                    )

This didn't happen before. It appears I can continue through the exceptions but I have to hit continue several times on each page load. I realize I could turn off my "Common Language Runtime throw errors" setting in Debug->Exceptions but I want it to break with errors that happen with my code (my "Enable just my code" is turned on).

Ideas?

Oh I should have added the LoaderExceptions:

Method 'GetControllerSessionBehavior' in type 'Microsoft.Web.Mvc.MvcDynamicSessionControllerFactory' from assembly 'Microsoft.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Method 'GetControllerSessionBehavior' in type 'Microsoft.Web.Mvc.Resources.ResourceControllerFactory' from assembly 'Microsoft.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

1 Answer, 1 is accepted

Sort by
0
Geoffrey Hudik
Top achievements
Rank 1
answered on 16 Nov 2011, 09:51 PM
Never mind, when running http://haacked.com/archive/2010/12/05/asp-net-mvc-diagnostics-using-nuget.aspx I realized I had MvcContrib nuget package installed when I should have had MvcContrib.Mvc3-ci package installed. That mismatch didn't cause an error from the Telerik menu before but it does now. At any rate it is fixed now. 
Tags
Menu
Asked by
Geoffrey Hudik
Top achievements
Rank 1
Answers by
Geoffrey Hudik
Top achievements
Rank 1
Share this question
or