System.Data.Entity.DbContext can't find to add as a reference

前端 未结 2 782

When I go to build my project, I get this error:

The type \'System.Data.Entity.DbContext\' is defined in an assembly that is not referenced. You must

相关标签:
2条回答
  • 2021-01-14 11:37
    1. Go to the Solution Explorer
    2. Right-Click on References -> Manage NuGet Packages...
    3. Select Online-> Microsoft and .NET Click
    4. Click Install next to .Net EntityFramework
    0 讨论(0)
  • 2021-01-14 11:38
    1. Select the project which throws this error
    2. Go to the menu View -> Other windows -> Package Manager Console
    3. Make sure your problematic project got selected in the default Project" drop-down in the PMC console.
    4. then type the command "install-package entityframework -version 5.0.0.0"

    It should install the missing version.

    0 讨论(0)
提交回复
热议问题