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 8459319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:18:05+00:00 2026-06-10T13:18:05+00:00

I just upgraded my MVC4 project to .NET 4.5 and EF5 and started using

  • 0

I just upgraded my MVC4 project to .NET 4.5 and EF5 and started using VS2012.
After realizing I needed to set-up auto-migrations in the Package Manager again I ran Enable-Migrations - EnableAutomaticMigrations and received the error

No context type was found in the assembly 'MySolutionName'.

Some Research has said that it has to do with EF5 not enabling prereleases. I ran Install-Package EntityFramework -IncludePrerelease but it said EF5 was already installed (which it was when I installed it through the NuGetmanager earlier without specifying -IncludePrerelease.

Does anyone know what I have to do to enable migrations for my project?

  • 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-10T13:18:06+00:00Added an answer on June 10, 2026 at 1:18 pm

    I just had the same problem and found your question while searching for a solution.

    I got it working. The problem, for me, was that I initially targeted the .NET 4.0 framework when I added the EF 5 via NuGet. Changing the target framework and then reinstalling EF 5 via NuGet, fixed it. It’s also possible (see comments) that just reinstalling EF 5 via NuGet is the solution for you.

    I had the following line in the App.config file, notice Version=4.4.0.0:

    <configuration>
      <configSections>
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </configSections>
    </configuration>
    

    So what I did was set the target framework to 4.5 inside the solution configuration and set the supported runtime to 4.5 too (inside the app config).

    Old:

      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
      </startup>
    

    New:

      <startup>
        <supportedRuntime version="v4.5" sku=".NETFramework,Version=v4.5" />
      </startup>
    

    After that change, I removed EF 5.0 via NuGet and added it again. It gave me the following configSection as result, notice Version=5.0.0.0:

    <configuration>
      <configSections>
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </configSections>
    </configuration>
    

    After that change, it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just upgraded my project from ASP.NET MVC1.0 to ASP.NET MVC4.0 One thing that
I just upgraded packages in an MVC 3 project (ASP.net 4), and now I
I just upgraded my project to .NET 3.5 and thought I had a perfect
I just upgraded my Windows Forms project from .NET 3.0 to .NET 3.5 and
I have just upgraded my project from ASP.net MVC 4 RC to RTM, but
We have an existing MVC2 project that we just upgraded to MVC4 following first
Just upgraded to Xcode 4.3.2 and trying to set up an OSX project.. However,
I just upgraded a hosted control to .NET 2.0 and I had to enable
I just upgraded my Nexus S to 4.0.3 (different story) Anyway, my app started
Having just upgraded to iOS 4.1 (Xcode 3.2.4) I am getting warnings when using

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.