Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 06, 2010 08:49 PM by gavinharriss
Jun 17, 2010 05:34 AM|LINK
I've just upgraded a VS 2008 project to VS 2010, converting the project but keeping the target as .NET 3.5 (SP1 is installed). My project worked without issue under VS 2008 on another machine.
I've added references to System.Web.Extensions.dll but I'm still getting the following errors from code in the App_Code folder:
1) Cannot find System.Web.Script.Service namespace
2) Type 'System.Web.Script.Services.ScriptService' is not defined.
3) Type 'System.Runtime.Serialization.Json.DataContractJsonSerializer' is not defined.
Anyone have any ideas what the problem might be as I'm pretty stumped? :(
Visual studio 2010
Jun 21, 2010 10:35 AM|LINK
Please check the target framework in lright-click project -> properties if it correctly sets as framework 3.5?
I'm looking forward for your reply.
Jun 21, 2010 08:29 PM|LINK
Hi XiaoCheng Fen,
Thanks for your input - much appreciated :)
I am indeed targetting 3.5 already. Also some extra information below that may or may not help...
The machine has fresh installs of all the latest software as I've just upgraded the hard drive and decided to start fresh: Windows 7, VS 2010, SQL Server 2008 R2, Office 2010, Expression 4. So there's no old beta / RC versions lurking around that might be
Jun 23, 2010 09:26 AM|LINK
Interesting... when using the Object Browser in VS 2010 and drill down to
C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll > System.Web.Script.Services I can't find a ScriptService item.
Also when I drill down to C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll > System.Runtime.Serialization I don't see a Json item either. Matches the problems reported in code.
Am I missing some install?
Jun 23, 2010 09:47 AM|LINK
Also interesting is that if I target the 4.0 framework instead of 3.5 everything works fine. Unfortunately 4.0 isn't available on my web server yet :(
Jun 24, 2010 09:14 AM|LINK
Copy System.Web.Extensions.dll from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 to C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0.
More about this problem, please visit
Jun 24, 2010 09:49 AM|LINK
Helped a bit - nice work :)
Still having trouble with System.Runtime.Serialization.Json.DataContractJsonSerializer so I guess ones parent assembly needs moving too. Seems a little messy to be moving around all these assemblies so I'll probably wait till microsoft releases a proper
Jun 24, 2010 10:01 AM|LINK
Copy System.ServiceModel.Web.dll from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 to C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0, and restart Visual Studio 2010.
Jun 24, 2010 10:19 AM|LINK
Awesome! Working perfectly now :) Thank you.
Jul 06, 2010 08:49 PM|LINK
If anyone else is encountering this issue and wants to track the bugs progress / vote the bug up with Microsoft: