none
EF 4.3.1 add-migration command gets ReflectionTypeLoadException: Unable to load one or more of the requested types RRS feed

  • Question

  • VS 2010 SP1 w/EF 4.3.1 SQL Server 2008 R2 - large WPF MVVM app w/14 projects in the solution - four EF "configuration" classes (ie, DbMigrationsConfiguration<T> definitions) in  one Configuration.cs file, one of which is named "App".

    This is the first add-migration I've tried against the full solution (did some experimentation on another simple console-app solution, which worked OK).

    The add-migration appears to have created the _MigrationHistory table, as expected.

    I've read other posts about this error, but none seem to identify or resolve the problem, except to do something like restarting VS (which I did). 

    How to troubleshoot?

    PMC output below.

    Thanks,

    DadCat

    ----------------------------------------------------------------------------------------------------------------

    Package Manager Console Host Version 1.8.30423.9026

    PM> add-migration App_AddKiiiWorkPath -conf App
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
       at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
       at System.Reflection.RuntimeModule.GetTypes()
       at System.Reflection.Assembly.GetTypes()
       at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.FindConfiguration()
       at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.GetMigrator()
       at System.Data.Entity.Migrations.Design.ToolingFacade.GetPendingMigrationsRunner.RunCore()
       at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
    Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    PM> $Error[0].Exception.ToString()
    System.Management.Automation.RuntimeException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    Wednesday, June 20, 2012 8:34 PM

Answers

All replies