Cannot find DataContractJsonSerializer from an Asp.Net Mvc application
Asked Answered
L

2

10

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

Lowis answered 14/7, 2009 at 18:49 Comment(0)
C
18

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

Crumpton answered 15/7, 2009 at 12:53 Comment(2)
I did that and it still can't find it: screencast.com/t/IOEUsdN1E any other suggestion?Lark
@Carlo, "The MSDN docs for .NET 3.5 incorrectly state that DataContractJsonSerializer lives in System.Runtime.Serialization.dll. This is true in .NET 4, but in 3.5 it's found in System.ServiceModel.Web.dll." - Ref: Comment by LukeH - URLBarmecide
C
0

Right Click in Project, Add Reference...

Search for System.Runtime.Serialization

Click Ok/Add

Cripps answered 19/11, 2018 at 21:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.