类型或命名空间名称不存在 [英] Type or namespace name does not exist

查看:449
本文介绍了类型或命名空间名称不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Visual Studio 2010中,这是工作的罚款WCF数据服务项目。突然,它并没有编译了。这是给我这样的消息:

I have a WCF Data Service project built with Visual Studio 2010, which was working fine. All of a sudden, it didn't compile anymore. It was giving me messages like:

7出错的类型或命名空间名称'服务'不命名空间System.Data这存在(是否缺少程序集引用?)C:\ü... S型\ Visual Studio 2010中\项目... \ DataService.cs ...

Error 7 The type or namespace name 'Services' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) C:\U...s\Visual Studio 2010\Projects...\DataService.cs ...

8的类型或命名空间名称Linq的错误并不在命名空间系统存在(是否缺少程序集引用?)DependencyResolver.cs 3月14日

Error 8 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) DependencyResolver.cs 3 14

错误10类型或命名空间名称'网络'不命名空间中存在的System.ServiceModel(是否缺少程序集引用?)

Error 10 The type or namespace name 'Web' does not exist in the namespace 'System.ServiceModel' (are you missing an assembly reference?)

12错误的类型或命名空间名称的DataService'找不到(是否缺少using指令或程序集引用?)

Error 12 The type or namespace name 'DataService' could not be found (are you missing a using directive or an assembly reference?)

我该如何解决这个问题?

How can I fix it?

推荐答案

我也有同样的问题,我不得不将所有项目的目标框架是相同的。然后,它内置的罚款。

I have had the same problem, and I had to set the "Target Framework" of all the projects to be the same. Then it built fine.

这篇关于类型或命名空间名称不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆