Incorrect version reference in Odata.svc for Microsoft.Data.Services RRS feed

  • Question

  • As a part of updating the data layer of our application (.NET Framework 4.5), I have to execute the Update Service Reference in Visual Studio for the client project. Recently, this has stopped working. I get the error:

        Could not load file or assembly 'Microsoft.Data.Services, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.

    I checked, and the only place the text "5.3.0" appears in any file in my solution is in Odata.svc in the service project:

        <%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, Microsoft.Data.Services, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Service="<MyServiceProjectName>.OData" %>

    The version of Microsoft.Data.Services.dll in my GAC_MSIL and C:\Program Files (x86)\Microsoft WCF Data Services\5.0\bin\.NETFramework are, but the ones in all of my project bin folder trees are I don't have a 5.3.* version of this dll anywhere. My project has the 5.6 versions of the WCF Data Services Client and the WCF Data Services Server NuGet packages installed.

    My coworkers can successfully update the service reference, so it may be something on my machine that is wrong and not something in the solution. We are all using the latest version of all the files from our TFS source code repository. I've done a Build | Clean Solution and then a full Build and it made no difference.

    I tried nstalling the "WCF Data Services 5.6.0 RTM Tools Installer", but that had no effect on the issue. The problem seems to be that when I attempt to update the service reference on the client, the service is invoked and throws an exception because it thinks it should have version 5.3 of the dll and can't find it.

    How can I update the Odata.svc file in the service project to reference the 5.6 version or update my machine to have the 5.3 version where it is needed?

    Wednesday, February 19, 2014 6:14 PM

All replies