您的位置:首页 > 其它

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。具体项目依赖关系如下:



错误信息:

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后问题解决了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐