How to update existing Windows Phone 7 OData applications to work with the new client tools
OData Client Tools for Windows Phone Apps is recently released to add support for consuming OData v3 services. You may already have a Windows Phone 7.1 application that consumes OData and want to update it to work with OData V3 services using the new Windows Phone SDK 8.0 and OData Client Tools for Windows Phone Apps.
In this short post we will describe how to update your existing Windows Phone 7 OData applications to take advantage of the new OData v3 support in client tools. This post assumes you already installed Windows Phone SDK 8.0 and OData Client Tools for Windows Phone Apps.
When an existing Windows Phone 7.1 application project is opened in the Windows Phone SDK 8.0, it will be referencing the System.Data.Services.Client.dll which doesn’t exist in the original reference path.
In this new release of the client tools, we re-architected our client assembly and split the one System.Data.Services.Client.dll assembly into four different assemblies. Therefore, these new assemblies need to be referenced to update the project. Fortunately, this is very trivial since we are using Nuget in this release.
Going through the following steps will update your existing project to work with the new client tools:
- Remove assembly reference to System.Data.Services.Client.dll
- Install the OData Client for Windows Phone Apps Nuget Package (Install-Package Microsoft.Data.Services.Client.WindowsPhone from Package Manager Console). This should add the new references and project should compile.
Now you are ready to enhance your existing application to work with OData v3 services.