I have two areas in my project. Now when I run the program I get this error:
Multiple types were found that match the controller named \'Home\'. This can h
Right click the project and select clean the project. Or else completely empty the bin directory and then re-build again. This should clear of any left over assemblies
I don't know what happen, but this code works fine:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "BaseAdminMVC.Areas.TitomsAdmin.Controllers" }
);
}
I got this error after doing a rename of my project namespace/assembly.
If you renamed the Namespace/Assembly you might have a leftover assembly/dll from the previous name in your bin folder. Just delete it from there and it should work.