The custom tool ‘DataServiceClientGenerator’ failed. Data service client code-generation failed: The element ‘DataService’ has an attribute ‘DataServiceVersion’ with an unrecognized version ‘3.0’..

Recently, I received this error when I was trying to add a ServiceReference (WCF) to my application. To solve this issue upgrade your WCF to the latest version, WCF Data Services 5.0 for OData V3.

Once you have downloaded and installed the ‘exe’:-

  • Remove any existing references to existing assemblies the name of which start with System.Data.Services from all your projects.
  • Instead add the reference of Microsoft.Data.Services.Client.dll wherever System.Data.Services.dll was used.

Microsoft.Data.Services.Client.dll can be found at the location, %programfiles(x86)%\Microsoft WCF Data Services\5.0\bin

To get more details about this upgrade, kindly visit the following link,
http://blogs.msdn.com/b/writingdata_services/archive/2012/04/16/upgrading-wcf-data-services-projects-to-wcf-data-services-5-0.aspx