The type or namespace name '***' could not be found (are you missing a using directive or an asse
2016-11-09 14:28
811 查看
今天在一个已有的Solution里面添加新的Project的时候出现了这个错误,具体出错步骤:
1. 现有Solution S, 包含项目 P1, P2.
2. 添加项目P3, P3引用P1, P2。具体项目依赖关系如下:
![](http://img.blog.csdn.net/20161109142516075?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
错误信息:
The type or namespace name '***' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name '***' does not exist in the namespace '***' (are you missing an assembly reference?)
本来很简单的事情,结果添加新项目后,新项目总是不能引用P1和P2。
最后研究很久才发现,原来P1和P2使用的是.NET Framework 4.5.1和新项目默认是4.5。最后将新项目也修改成4.5.1后问题解决了。
1. 现有Solution S, 包含项目 P1, P2.
2. 添加项目P3, P3引用P1, P2。具体项目依赖关系如下:
错误信息:
The type or namespace name '***' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name '***' does not exist in the namespace '***' (are you missing an assembly reference?)
本来很简单的事情,结果添加新项目后,新项目总是不能引用P1和P2。
最后研究很久才发现,原来P1和P2使用的是.NET Framework 4.5.1和新项目默认是4.5。最后将新项目也修改成4.5.1后问题解决了。
相关文章推荐
- The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an asse
- 如何解决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 'log4net' could not be found (are you missing a using directive or an assembly refere
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- 菜鸟写给菜鸟——The type or namespace name '****' could not be found (are you missing a using directive or an assembly reference
- could not be found (are you missing a using directive or an assembly reference?)
- `UnityEditor' could not be found Are you missing a using directive or an assembly reference?
- Compiler Error Message: CS0234: The type or namespace name 'BorderDetails' does not exist in the class or namespace 'Infragistics.WebUI.Shared' (are you missing an assembly reference?)
- Unity使用FXMaker导致发布时报“The type or namespace name `UnityEditor' could not be found” 解决备忘
- MSbuild failure: error CS0246: The type or namespace name 'DataLoader_Accessor' could not be found
- The type or namespace name 'DbContext' could not be found-vs2012
- Compiler Error Message: CS0234: The type or namespace name ''(are you missing an assembly reference?)
- WCF分布式开发常见错误(4):The type or namespace name 'DataContract' could not be found DataContract找不到
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.”
- 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
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.” 错误