VB Magic

2012/12/06

WCF Service Application and “is ambiguous in the namespace ‘System.Data.Services.*'”

Hi,

I created a WCF Service Application project and then added nuget packages to enable me to use entity framework and Windows Azure. After this point. all my services were getting the following error:

Error 5
'DataServiceProtocolVersion' is ambiguous in the namespace 'System.Data.Services.Common'.

Which was referencing this line of code:

config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3

In-particular the DataServiceProtocolVersion enum

After doing a lot of searching around on the web. I could not find any solution to this, so I started to go through removing references. (Thinking that something I added with Nuget is causing the conflict)

I removed the System.Data.Services.Client reference and Everything started working again.

I then used the Object Explorer which showed that DataServiceProtocolVersion now resided in the:

Microsoft.Data.Services.Client

Assembly.

Just posting this in case I can help save some time for anyone else who is suffering from this issue.

2 Comments »

  1. I had this problem. You saved me. Thanks.

    Comment by Jose Cifre — 2013/04/08 @ 11:01 pm

  2. thanks for helping to narrow it down for me! Not sure if they have changed or not, but this worked for me:

    config.DataServiceBehavior.MaxProtocolVersion = Microsoft.Data.OData.ODataVersion.V3

    Comment by Terence F — 2013/07/21 @ 7:34 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: