0

I have Home controller in main Controllers folder and in Controllers folder of some Area. As result I get an error telling ASP.NET MVC can not find out which of Home controllers to use:

Multiple types were found that match the controller named 'home'. This can happen if the route that services this request ('') 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.

I found a similar two years old question. What is the current state of this feature? Should it work or may be I am doing something wrong?

Community
  • 1
  • 1
SiberianGuy
  • 24,674
  • 56
  • 152
  • 266

1 Answers1

0

I suppose, it's not only T4MVC problem, but MVC in general. Phil Haack described it for MVC2, there wasn't much changes since then, afaik.

Btw, the error contains an exact suggestion what to do, did you follow it?

Shaddix
  • 5,901
  • 8
  • 45
  • 86
  • I know about ASP.NET MVC problem but T4MVC has a possibility to specify namespace by itself (al least theoretically). I wanted to know whether there were some improvements since the post I have references in the question – SiberianGuy Jun 22 '12 at 16:19
  • @Ldsa -> You have to specify the namespace for your routes in your route registration (that is by default in the global.asax), something T4MVC does not change. – Akos Lukacs Jun 23 '12 at 10:42