I just recently upgraded to Visual Studio 2010.  After trying to build the site for the first time (in VS2010 that is), I got an unusual error message.

For some reason, VS2010 didn’t like this code any more when VS2008 was ok with it:

ScriptManager.RegisterClientScriptBlock(page, typeof(string), "EditHTML", js, true);

Visual Studio 2010 was complaining that ScriptManager does not exist in the current context.  Yet it compiled fine in 2008 Studio.

After a little searching on the net, I found a conversation about having to add a reference to System.Web.Extensions to the project.  Doing this resolved the problem for me.

So technically, VS 2010 was right – it didn’t exist in the current context Smile