The type or namespace name 'DbContext' could not be found-vs2012
2016-09-03 22:32
1496 查看
The type or namespace name 'DbContext' could not be found
The type or namespace name 'DbSet' could not be found
这个怎么处理呢?
我们在进行程序编写的时候,using System.Data.Entity; 这个已经写了,怎么还是不行?
即使在References 中已经添加了引用还是不行,
原因是要添加
EntityFramework
如果在添加了System.Data.Entity这个引用无效后;
可以使用NuGet进行处理;
项目右键选择:
The type or namespace name 'DbSet' could not be found
这个怎么处理呢?
我们在进行程序编写的时候,using System.Data.Entity; 这个已经写了,怎么还是不行?
即使在References 中已经添加了引用还是不行,
原因是要添加
EntityFramework
如果在添加了System.Data.Entity这个引用无效后;
可以使用NuGet进行处理;
项目右键选择:
相关文章推荐
- The type or namespace name '***' could not be found (are you missing a using directive or an asse
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.” 错误
- 如何解决The type or namespace name 'ScriptService' could not be found (are you missing a using directive or an assembly reference?)
- .net4 wpf App 使用log4net 错误:The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- MSbuild failure: error CS0246: The type or namespace name 'DataLoader_Accessor' could not be found
- The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly refere
- Unity使用FXMaker导致发布时报“The type or namespace name `UnityEditor' could not be found” 解决备忘
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.”
- WCF分布式开发常见错误(4):The type or namespace name 'DataContract' could not be found DataContract找不到
- The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an asse
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- The controller for path '/favicon.ico' could not be found or it does not implement the IController interface./r/nParameter name:
- mybatis 引用对象属性映射错误 or could not be found for the javaType (xxx.model) : jdbcType (null) combination.
- Microsoft.Practices.Unity使用配置文件总是报错The type name or alias could not be resolved.
- Cannot complete the install because one or more required items could not be found.
- The type or namespace name 'Service' does not exist 异常处理
- The type or namespace name 'Windows' does not exist in the class or namespace 'System'