1

I have Visual Studio 2010. If I try to add a service reference to my project I get the error

This service cannot be consumed by the current project. Please check if the project target framework supports this service type.

But if I run DataSvcUtil on the same endpoint, it works fine.

The thing is that when Visual Studio generates the reference, it generates Reference.cs, Reference.datasvcmap, and service.edmx (I know this because the files used to be there, I deleted the reference to try to re-generate it and am running into this issue). If I use the command line tool, I only get myfile.cs (or whatever I named the output file).

Why would this be the case?

4

1 回答 1

0

您在 WCF 数据服务中使用的 OData 库是否比 VS2010 附带的更新版本?如果是这样,您可能需要升级到 VS2012 ...

于 2012-10-27T10:14:38.657 回答