I have a problem like this on server
[A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to [B]System.Web.WebPages.Razor.Configuration
Just in case ian's answer wasn't enough (and the assemblies correct, but the casting is still wrong) chances are you didn't update the to reflect the new assembly yet. make sure the assembly portion also references version 3.0 of the System.Web.WebPages.Razor library. e.g.
(Notice that they all reference version=3.0.0 now)