在Visual Studio 2010中,我正在尝试制作项目的副本并将其放入同一解决方案中。我将文件复制到Windows资源管理器中解决方案文件夹下的单独文件夹中,然后在VS中从原始项目复制并粘贴到新项目。
当我从原始项目运行解决方案时,它工作正常。但是,当我尝试从新项目运行它时,它会引发异常:
Multiple types were found that match the controller named 'Main'. 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:
TheCopiedProject.Controllers.MainController
TheOriginalProject.Controllers.MainController
我对复制的项目(Ctrl-Shift-F)进行了搜索,但是在任何地方都没有对原始项目命名空间的引用。
显然,我遗漏了一些东西 - 我需要做些什么才能解决这个问题?