The type or namespace name 'Entity' does not exist in the namespace 'System.Data'

后端 未结 21 1604
余生分开走
余生分开走 2020-12-08 12:46

I\'m using WS class and it gave me error when I run the application:

The type or namespace name \'Entity\' does not exist in the namespace \'System.Data\' 
<         


        
21条回答
  •  佛祖请我去吃肉
    2020-12-08 13:12

    Make sure you have the EntityFramework Nuget package installed for your project.

    From @TonyDing's answer:

    Right-click on the Solution from the Visual Studio Solution Explorer click the Manage Nuget packages for solution and install the EntityFramework

    Once it is installed, I still had the error, but then did a reinstall per @papergodzilla's comment:

    Update-Package -reinstall

    and it resolved my issue

    Do this in the Package Manager Console (View > Other windows > Package Manager Console).
    Now everything is good!

提交回复
热议问题