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

4 posts, 0 answers
  1. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 05 Oct 2010 Link to this post

    Hi,

    I am getting this error about 75% of the time when running my project in VS 2010.  This seems to be since upgrading to version 2010.2.929.40.  This is now getting in the way of speedy development and debugging.

    The full error is:

    [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() +4
       System.Reflection.Assembly.GetTypes() +78
       System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() +32
       System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() +25
       System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) +160
       System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage, Object& loaderCookie, Dictionary`2& typesInLoading, List`1& errors) +166
       System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +316
       System.Data.Metadata.Edm.ObjectItemCollection.ExplicitLoadFromAssembly(Assembly assembly, EdmItemCollection edmItemCollection, Action`1 logLoadMessage) +53
       System.Data.Metadata.Edm.MetadataWorkspace.ExplicitLoadFromAssembly(Assembly assembly, ObjectItemCollection collection, Action`1 logLoadMessage) +93
       System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly, Action`1 logLoadMessage) +130
       System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +585
       System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +76
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
       Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +1256
       Telerik.Web.UI.RadComboBox.PerformSelect() +37
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
       Telerik.Web.UI.RadComboBox.DataBind() +70
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
       System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
       Telerik.Web.UI.RadDataBoundControl.OnPreRender(EventArgs e) +36
       Telerik.Web.UI.RadComboBox.OnPreRender(EventArgs e) +46
       System.Web.UI.Control.PreRenderRecursiveInternal() +103
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
    

    This could be an Entity Framework error, but seems to have started happening around the time of the upgrade.  Can you confirm for me whether it is EF or the RadComboBox?

    Thanks.

  2. Craig Wallace
    Craig Wallace avatar
    118 posts
    Member since:
    Jan 2005

    Posted 05 Oct 2010 Link to this post

    This seems to have been caused by having an old reference or copy of a telerik assembly either referenced or in the bin folder.  I removed all Telerik references and cleared the files from bin and it went away.  This was after a recent update of the Telerik version.
  3. Harry
    Harry avatar
    1 posts
    Member since:
    Sep 2010

    Posted 10 Nov 2010 Link to this post

    Thanks Craig. 

    I had a similar issue after recent Telerik upgrade. 

    Harry
  4. Dan
    Dan avatar
    9 posts
    Member since:
    Sep 2010

    Posted 02 Mar 2011 Link to this post

    Take a look at this post on Microsoft Connect: http://connect.microsoft.com/VisualStudio/feedback/details/541962/unable-to-load-one-or-more-of-the-requested-types-connected-with-entitydatasource

    What worked for me was adding ContectTypeName to the EntityDataSource. For example, ContextTypeName="CMRPemployees.Data_Access.dbCMRP_EmployeesEntities" 

    Dan
Back to Top