Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC Namespace renaming

I renamed my project from MyProjectName to MyNewProjectName. I did a complete find/replace on the solution and changed the test project aswell. In Default.aspx.cs I get an InvalidOpterationException with

"The controller name 'Home' is ambiguous between the following types: MyNewProjectName.Controllers.HomeController MyProjectName.Controllers.HomeController."

How do i fix that? Thanks

like image 442
Daniel A. White Avatar asked Feb 05 '09 18:02

Daniel A. White


1 Answers

Have you tried to rebuild (right click on project, and select "Rebuild")? Also check the bin to make sure only the assembly with the new name is there. Also, double check the project properties to verify the name of the assembly is outputted. If you're not sure what the name of the outputted assembly is, delete all the dlls from bin and rebuild.

like image 76
John Sheehan Avatar answered Oct 07 '22 19:10

John Sheehan