【发布时间】:2017-02-10 12:22:03
【问题描述】:
我在 Visual Studio C# 项目中使用 EntityFramework 作为我的数据访问层。我添加了一个新的实体模型并立即构建,而无需添加或做任何事情来测试其功能。不幸的是,构建失败并出现许多错误,例如:
CS0426 The type name 'Data' does not exist in the type 'System'
CS0138 A 'using namespace' directive can only be applied to namespaces; 'System' is a type not a namespace. Consider a 'using static' directive instead
CS0246 The type or namespace name 'Nullable<>' could not be found (are you missing a using directive or an assembly reference?)
代码编辑器本身看起来好像缺少某些东西,即使一切都到位
图片显示了我在项目中的编辑器和参考资料
P.S:项目类型为类库
【问题讨论】:
-
该项目的“目标框架”是什么?您是否尝试右键单击解决方案 -> 清理,然后右键单击 -> 全部重建?
标签: c# entity-framework visual-studio ado.net entity-framework-6