MVC unit testing error

January 06, 2011 - asp-net-mvc unit-testing

I was trying to run a unit test on an MVC 3 controller and check the output of a RedirectToRouteResult when I got the following compiler error:

Cannot apply indexing with [] to an expression of type 'System.Web.Routing.RouteValueDictionary'

This confusing and clearly incorrect error message actually means: "You fool, you've forgotten to add a reference to System.Web".