views:

94

answers:

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.

A: 

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:

Enrico Campidoglio
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.
Water Cooler v2
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: http://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?
Enrico Campidoglio
@Enrico: 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?
Water Cooler v2
Try adding a reference to System.Web.dll
Enrico Campidoglio