MVC – Multiple types were found that match the controller named ‘Home’.

 

When I create a new MVC project I normally compile and run it before making any changes. The first change I make after this is normally to the assembly name and namespace. After amending the namespaces of the default controllers and model and also the global.asax markup (which I invariably forget) I re run.

If you then get the error”Multiple types were found that match the controller named ‘Home’.” It is likely that the assembly from your initial compile still exists in the bin directory. Just clear the directory and rerun.

9 thoughts on “MVC – Multiple types were found that match the controller named ‘Home’.

  1. Thanks. I had exactly that problem as you describe, browsing many pages for solution, but this one really works.

  2. Oh very Thank you!!! this saved me. I lost an hour with this problem until I found this solution. it’s very work and easy haha Thank you agian.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.