Make sure you have
using System.Web.Mvc;
in your .cs file
Also make sure that you have the reference in your Solution Explorer, References section.
If not then I suggest the easiest way to sort this out is to create a new project, select the correct template and copy your code over into the new project.