I am trying to use JavaScriptSerializer
in my application.
I initially received
Cannot find JavaScriptSerializer
and I solved it by adding:
using System.Web.Script.Serialization;
But then the sub-keyword Script
is underlined with a blue line:
The type or namespace 'Script' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
So I added to the project a reference to:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.Extensions.dll
That didn't help. I am still receiving the same blue underline with same error. The reference is marked with an exclamation mark yellow warning:
I tried the suggested solutions on this thread, but as @user781490 indicated, they didn't help in my situation.
Any idea how to resolve this?
.NET Framework 4 Client Profile
but: (1) I am not interested in converting it to a.NET Framework 4
. (2) If you read that thread, you'll notice that the tips there didn't help even for those who had the full.NET Framework 4
. Surely there must be a way to useJavaScriptSerializer
in a Client Profile, right? – Vinegarish.NET Framework 4 Client Profile
to.NET Framework 4
, I get a warning that horrible things might happen to my project... So when asked "Are you sure you want to change the Target Framework for this project?", of course I clickNo
. – Vinegarish