views:

1237

answers:

2

I can't get access to the DataContractJsonSerializer method from System.Runtime.Serialization.Json

If I do:

using System.Runtime.Serialization.Json;

I get an error...

How can I access this in my Asp.Net Mvc app so I can use the DataContractJsonSerializer method

+3  A: 

Make sure you've referenced the DLL where this type lives: System.ServiceModel.Web.dll

Brad Wilson
A: 

I had the same error after upgrading to the release version of the Silverlight 3.0 SDK.

"The type or namespace name 'DataContractJsonSerializer' could not be found (are you missing a using directive or an assembly reference?)"

I noticed several new compiler warnings which showed up before this error. I fixed those warnings (which required code changes, not reference changes) and the error went away.

Jordan Duerksen
John Saunders