I just had to downgrade my ASP.Net 4.5.2 application to ASP.Net 4.0. Of course, this creates problems with it, for example, links that are not installed true. I have solved some of them already, but I can not ponder the error:
CS106 'RouteCollection' does not contain a definition for 'MapMvcAttributeRoutes' and the extension method 'MapMvcAttributeRoutes' takes the first argument of the type 'RouteCollection' can 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 anyone know what should I do here?
Additional Information
Namespaces I use:
- using System.Web
- using System.Web.Mvc
- using System.Web.Routing
- , System.Web.Http
Visual Studio 2015