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=5.3.0.0, 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=5.3.0.0, 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 5.0.0.50627, but the ones in all of my project bin folder trees are 5.6.0.61587. 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.

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

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top