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

前端 未结 2 798

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条回答
  •  Happy的楠姐
    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.

提交回复
热议问题