Jör*_*eyn 5 c# asp.net-mvc asp.net-web-api
我为我的整个项目重命名了我的命名空间.一切仍然正常,但我的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
Run Code Online (Sandbox Code Playgroud)
所以我将第一个命名空间重命名为第二个命名空间,我在各处搜索旧命名空间,但没有找到任何内容.那么,我该怎么办?
感谢帮助.
那么,我该怎么办?
转到binWeb应用程序的文件夹并删除旧的程序集.ASP.NET加载bin文件夹中存在的所有程序集.因此,如果您说您重命名了一些类库项目引用,那么旧程序集仍然存在.
| 归档时间: |
|
| 查看次数: |
1628 次 |
| 最近记录: |