Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8691493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:07:54+00:00 2026-06-13T00:07:54+00:00

I have worked with other migration projects and had no problem. in my current

  • 0

I have worked with other migration projects and had no problem. in my current project i seperated the migration and model projects. I get the following error when adding migration or even when enabling migration (the configuration class is created):

PM> enable-migrations -Force No classes deriving from DbContext found
in the current project. Edit the generated Configuration class to
specify the context to enable migrations for.
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.ModelConfiguration.Mappers.TypeMapper.<.ctor>b_1(Assembly
a) at System.Linq.Enumerable.d
_142.MoveNext()
at System.Collections.Generic.List
1.InsertRange(Int32 index,
IEnumerable1 collection) at
System.Data.Entity.ModelConfiguration.Mappers.TypeMapper..ctor(MappingContext
mappingContext) at
System.Data.Entity.DbModelBuilder.MapTypes(EdmModel model) at
System.Data.Entity.DbModelBuilder.Build(DbProviderManifest
providerManifest, DbProviderInfo providerInfo) at
System.Data.Entity.DbModelBuilder.Build(DbConnection
providerConnection) at
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext
internalContext) at
System.Data.Entity.Internal.RetryLazy
2.GetValue(TInput input) at
System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at
System.Data.Entity.Internal.LazyInternalContext.get_CodeFirstModel()
at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext
context, XmlWriter writer) at
System.Data.Entity.Migrations.Extensions.DbContextExtensions.<>c_DisplayClass1.b_0(XmlWriter
w) at
System.Data.Entity.Migrations.Extensions.DbContextExtensions.GetModel(Action`1
writeXml) at
System.Data.Entity.Migrations.Extensions.DbContextExtensions.GetModel(DbContext
context) at
System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration
configuration, DbContext usersContext) at
System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration
configuration) at
System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor(DbMigrationsConfiguration
migrationsConfiguration) at
System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.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.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:07:55+00:00Added an answer on June 13, 2026 at 12:07 am

    The message says that you have no class deriving from DbContext which means that you need to define one.

    Something like this:

    class MyContext: DbContext
    {
       public DBSet<Some_Entity_Which_Represent_DB_table> SetName {get;set;}
    
       public MyContext() : base(here you can specify database with its name or connectionString or leave it empty)
       {}
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have worked many projects with no problems. But in current project, I tested
I have got an(other) error while trying to upgrade our large project to SL4.
I have worked on two projects using Ajax and Ruby. In one project, I
I have worked a bit with Django and I quite like its project/applications model
I have worked on this problem for my entire day and can't solve it.
I have worked within a web development company where we had our local machines,
I have a very simple user model. When I first created it, it had
I have worked on maven projects in which the directory structure looks like: src/
I have worked in a web project with a heavy part on JavaScript, and
I have worked on an Android project for which I've used versioning locally and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.