Unable to install EntityFramework from NuGet Package Manager


  • Hello,

    I get an error "The type 'DbSet<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'EntityFramework, Version=, Culture= neutral, PublicKeyToken=b77a5c561934e089'.

    Since I can't see EntityFramework in Reference Manager, so I try to install EntityFramework in NuGet Package Manager. But I get "A task was canceled" and EntityFramework still not in Reference Manager.

    Please help,



    Wednesday, March 9, 2016 10:23 PM


  • Hi Ming,

    Thanks for your post.

    Could you please tell me what's the version of your VS and what's your project type?

    I did a test in my side using VS2015 Update1 and it works well in my side. I can add the "EntityFramework" into Reference via Nuget Package Manager successfully.

    Please restart your Visual Studio and follow the steps then try it again.

    Also try running  your Visual Studio in Safe mode to Check whether some add-ins and extensions affect it (devenv /safemode)

    1. Create a new project

    2. Tools->Nuget Package Manager->Manager Nuget Packages for solution

    3. Install the EntityFramework

    If still has the same error message. I suppose there might something wrong with your Visual Studio.

    Try to repair your Visual Studio or install the latest update of your VS. For example, VS2015 Update1 VS2013 Update5.

    Best Regards,

    Lake Xiao

    Thursday, March 10, 2016 6:13 AM