我有Visual Studio 2010.如果我尝试向项目添加服务引用,我会收到错误
This service cannot be consumed by the current project. Please check if the project target framework supports this service type.
但是,如果我在同一端点上运行DataSvcUtil,它可以正常工作。
当Visual Studio生成引用时,它会生成Reference.cs
,Reference.datasvcmap
和service.edmx
(我知道这是因为以前的文件,我删除了引用试图重新生成它并遇到这个问题)。如果我使用命令行工具,我只得到myfile.cs
(或者我命名为输出文件的任何东西)。
为什么会出现这种情况?
答案 0 :(得分:0)
您在WCF数据服务中使用的是比VS2010更新版本的OData库吗?如果是这样,您可能需要升级到VS2012 ......