1

I see that a JSON serializer is present in the System.Web.Script.Serialization namespace, and is shipped in the System.Web.Extensions.dll assembly.

Is this assembly distributed with the .NET framework v4.0 redistributable? Is it also guaranteed to be present on a user's machine if any edition of Visual Studio 2010 is installed?

Added Later: I don't see the said DLL in the '.NET' tab in the Add Reference dialog box in Visual Studio 2010. I do see it in the \Windows\Microsoft.NET\Framework\v4.x.xx.xx folder.

When I browse to the said folder and add a reference to the DLL, it shows a yellow exclamation icon next to the reference, in the Solutions Explorer. And I can't access anything from within that assembly in my code.

I am, however, able to view the contents of the DLL in Reflector.

1 Answer 1

1

It's part of the .NET Framework 3.5 and 4.0, so yes.

However it is not included in the .NET Framework Client Profile. If you are using the Client Profile, you may want to look at the System.Runtime.Serialization.Json.DataContractJsonSerializer class instead.

Related Resources:

Sign up to request clarification or add additional context in comments.

4 Comments

And what's this client profile? How do I know if my installation is client-profiled? Secondly, I don't see the said DLL in the '.NET' tab in the Add Reference dialog box in Visual Studio 2010. I do see it in the \Windows\Microsoft.NET\Framework\v4.x.xx.xx folder. When I browse to the said folder and add a reference to the DLL, it shows a yellow exclamation icon next to the reference, in the Solutions Explorer. And I can't access anything from within that assembly in my code. I am, however, able to view the contents of the DLL in Reflector.
The Client Profile is a streamlined version of the .NET Framework that only includes what's needed to run a typical desktop application. More info here: msdn.microsoft.com/en-us/library/cc656912.aspx. Regarding the missing System.Web.Extensions.dll, which version of the .NET Framework are you targeting in your project?
I am using Visual Studio 2010 Ultimate Edition and am targeting v4 of the framework. When I set a reference to the said ASM, it won't let me use it in Visual Studio in a Console application. Is there some other reference I need to set, probably a dependency that the DLL itself uses?
Try adding a reference to System.Web.dll

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.