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

  • Home
  • SEARCH
  • 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 7899535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:43:41+00:00 2026-06-03T08:43:41+00:00

BACKGROUND I’m using VS 2010 on a machine where I installed .Net 4.5 which

  • 0

BACKGROUND
I’m using VS 2010 on a machine where I installed .Net 4.5 which I’ve read was an in-place install (overrode the .net 4.0 version).

I have projects still targeting 4.0 and 4.5 option is not available but was told it’s ok since 4.5 was an in-place install. I then installed EntityFramework -pre via nuget and notices when I ran Upgrade-Database -Script commands, it would not generate enum properties.

I then found this. I tried doing everything from scratch again but it was still adding EntityFramework 4.4 instead of 5.0. So I manually changed all references to point to the 5.0 version to make sure I have EF 5.0 version. All compiled.

PROBLEM
When I run

Enable-Migrations -EnableAutomaticMigrations

I get “No classes deriving from DbContext found in the current project.
Edit the generated Configuration class to specify the context to enable migrations for.
“

So I manually made sure that my class is correct as in:

internal sealed class Configuration : DbMigrationsConfiguration<DataContext>
{
    public Configuration()
    {
        AutomaticMigrationsEnabled = true;
    }

DataContext subclasses DbContext.

When I run

Update-Database -Script

I get “No migrations configuration type was found in the assembly ‘MyProject’. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).“

MyProject does have the configuration class I mentioned above and in Package Manager Console I am choosign the right dropdown for my project containing Migrations folder and this Configuration class.

QUESTION

  1. What do I do to make sure when I install EnittyFramework via nuget that it adds the 5.0 version and not 4.4 even though I have .Net 4.5 installed?

  2. If I can’t do anything related to the question above, what can I do to make sure Upgrade-Database spit out a script?

  • 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-03T08:43:43+00:00Added an answer on June 3, 2026 at 8:43 am

    Entity Framework 5.0 isn’t out yet. There are prereleases, but you need to specifically enable prereleases in order for NuGet to display them.

    However, keep in mind that EF 5.0 won’t support everything in .NET 4.0 that it will in .NET 4.5. Yes, .NET 4.5 overwrites .NET 4.0, but if your project is in VS2010, it will be configured to build for .NET 4.0, not .NET 4.5. It cannot assume .NET 4.5 features, because the result needs to run on systems that don’t have .NET 4.5. You’re targeting .NET 4.0, after all, and enum support isn’t in the EntityFramework DLL you get from NuGet, it’s in the System.Data.Entity DLL that’s part of the .NET runtime, so it cannot be added in .NET 4.0. You can install the Visual Studio Beta to create applications that target .NET 4.5.

    In short: “was told it’s ok since 4.5 was an in-place install” — no, it’s not ok for your purposes.

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

Sidebar

Related Questions

Background I am writing code in VS 2010, .NET 4, C#. Also, in case
Background I have a ror application which is continuously recording and showing on a
Background We have an asp.net 4.0 web application written in C# that calls a
Background I have built a VB .NET application on the 4.0 Framework, part of
Background: I have a jQuery validation script, which is used on almost all my
Background: I am using Eclipse to develop an Android app. I have an xml
Background I have a Access 2010 database and want to create a pop-up progress
Background: One of the problems with using a local static variable in a function
Background: I want to check-out the source code from Cliche , which is stored
BACKGROUND: Co-worker Adam has been using Google refine to process database downloads with much

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.