5

How to fix ?

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.

The request for 'Home' has found the following matching controllers: MyProject1.Controllers.HomeController MyProject2.Controllers.HomeController

1
  • Are you separating them by Area? Commented Mar 23, 2011 at 22:29

3 Answers 3

15

Probably need a little bit more details. For e.g. Did you change the namespace from MyProject1 to MyProject2?

Check your bin folder to see if any of dlls from the old namespace are still around. If that's the case cleaning them up and recompiling should fix the issue.

Sign up to request clarification or add additional context in comments.

2 Comments

In my case the old dll was in Bin folder.
I found the DLL's in the BIN folder too - great answer! Thank you!
2

Make sure you edit the default namespace setting in your web project properties, on the Application tab.

Comments

1

I assume this is in your Views. Be certain the namespaces in your views is correct.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.