1

在 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)进行了搜索,但在任何地方都没有对原始项目的命名空间的引用。

显然,我遗漏了一些东西 - 我需要做什么来解决这个问题?

4

0 回答 0