After namespace change “multiple types were found that match the controller named ‘X'”

I started work on a new MVC 5 project today and after working on it for a short while I decided I wanted to change the name of the web project to [ProjectName].WebUI from just [ProjectName].  So, I renamed the project, updated the project namespace and updated all my files to use the new namespace so my solution was now made up of [ProjectName].sln, [ProjectName].WebUI and [ProjectName].WebUI.Tests.  All good I thought, but then I went to debug it and got this message:

Multiple types were found that match the controller named ‘Home’. This can happen if the route that services this request (‘{controller}/{action}/{id}’) does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the ‘MapRoute’ method that takes a ‘namespaces’ parameter.

Continue reading