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

后端 未结 21 1588
余生分开走
余生分开走 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:09

    Most of the answers here seem to lack awareness of the namespace change that happened between EF 6.2 and 6.3.

    I was intentionally upgrading from EF 6.1 to 6.3 to be able to target .NET Standard 2.1. However, I accidentally used .NET Standard 2.0 for the new target in my lib and then got the The type or namespace name 'Entity' does not exist in the namespace 'System.Data'. This GH issue comment gave me the clue I needed to fix. I changed my lib target to .NET Standard 2.1 and the project compiled. No re-installs, uninstalls, or restarts were required.

提交回复
热议问题