我重命名了我的整個項目的命名空間。一切仍然正常,但我的WebAPI現在爲我的控制器找到兩條路線。命名空間重構後的兩條路徑MVC WebAPI
Multiple types were found that match the controller named 'department'.
This can happen if the route that services this request ('api/{controller}/{id}') found multiple controllers defined with the same name but differing namespaces, which is not supported.
The request for 'department' has found the following matching controllers:
A***.P***.Benutzerverwaltung.Jo***MVC.Controllers.DepartmentController
A***.Benutzerverwaltung.API.Controllers.DepartmentController
所以我改名爲第一個命名空間爲第二,我到處找舊的命名空間,但什麼也沒有找到。那麼,我該怎麼辦?
感謝您的幫助。
您是否還重命名了引用的項目? –
是的,我的解決方案中有三個項目,我改名爲兩個 –