Thursday, March 21, 2013

Updating 'Microsoft.Data.OData 5.2.0' to 'Microsoft.Data.OData 5.3.0' failed


Updating 'Microsoft.Data.OData 5.2.0' to 'Microsoft.Data.OData 5.3.0' failed. Unable to find a version of 'Microsoft.AspNet.WebApi.OData' that is compatible with 'Microsoft.Data.OData 5.3.0'.

WCF Data Services 5.3.0 RTW has been released few days back. Once you install it using the tools installer, it will update the "Add Service Reference" tooling integration in Visual Studio, after which it'll create the code based on the WCF Data Services 5.3.0.  In such case, for now if you try to add service reference to a WCF Data Service in an ASP.NET MVC 4 project you might end up getting the error specified at the top of this page.

As mentioned in the error, it seems that the respective "Microsoft.AspNet.WebApi.OData" dll is not available in the last ASP.NET MVC 4 update. Hope this will be made available in the next related update.

Solution: Uninstall the respective program installed using the WCF Data Services 5.3.0 RTW tools installer. If you try the service reference now it'll get you with Microsoft.Data.OData 5.2.0 in the client. This way we can go with WCF Data Service created with 5.3.0 version and the respective client libraries (proxy....) with 5.2.0 (in ASP.NET MVC 4 client projects). Just tried locally, but didn't verified entire features.
As an alternate try with Nuget packages.

No comments:

Post a Comment

Creative Commons License
This work by Tito is licensed under a Creative Commons Attribution 3.0 Unported License.