I just had to downgrade my ASP.Net 4.5.2 application to ASP.Net 4.0. Of course this brings problems with it, like references that are not installed correct. I solved some of them already, but I can't get my head around an error:
CS106 'RouteCollection' does not contain a definition for 'MapMvcAttributeRoutes' and no extension method 'MapMvcAttributeRoutes' accepting a first argument of type 'RouteCollection' could be found
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttributeRoutes();
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "device", action = "view", id = UrlParameter.Optional });
}
}
Does someone know what I have to do here?
Extra info
Namespaces that I use:
- using System.Web
- using System.Web.Mvc
- using System.Web.Routing
- using System.Web.Http
Visual studio Community 2015