I decided how to solve this problem.
http://localhost/myWcfDataService.svc/$metadata
Save this result to disk, for example c:\metadata.csdl
Then manually edit the file and delete (or rename) the damaging field (this will lead to the fact that it will not be used in your service, but it is better than the whole service does not work).
Then run the following:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\DataSvcUtil.exe /language:CSharp /in:c:\metadata.csdl /out:c:\serviceReference1.cs
Now add the newly created serviceReference1.cs
file to the visual studio project, find the class that inherits from System.Data.Services.Client.DataServiceContext
, this is your service entry point.
Further information can be found here .
source share