Check the simple things first. Do those types exist in those namespaces? e.g. it's complaining that you don't have a Controllers in xxx. So, go to your controllers and what namespace are they in? Did you add say a company id in front of them? So now they're
in yyy.xxx.Controllers?
make sure the necessary assemblies present in your Reference,like, you Project Dll,
System.Web.Mvc.dll and so on
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
I know it has been some time since your original post but I just had the same problem. The solution was to add a reference in the test project to reference the main project.
I had the same error. I already had the appropriate assembly reference so it was tricky. The solution:
Make sure the .NET framework version targeted are compatible! I was trying to add a .NET 4.5 .dll into a .NET 4.0 project and that just didn't work until I upgraded the 4.0 => 4.5.
fgeorge
Member
29 Points
198 Posts
The type or namespace name 'Controllers' does not exist in the namespace 'XXX' error in VS2008
Jan 23, 2010 02:55 PM|LINK
Hello,
I use vs2008 and my MVC 1.0 and 2.0 Projects were working perfectly but all of a sudden i have an error on trying to compile all of them;
The error is of the form;
Error 1 The type or namespace name 'Controllers' does not exist in the namespace 'XXX' (are you missing an assembly reference?)
Error 3 The type or namespace name 'Models' does not exist in the namespace 'XXX' (are you missing an assembly reference?)
Error 4 The type or namespace name 'AccountController' could not be found (are you missing a using directive or an assembly reference?)
Error 5 The type or namespace name 'IFormsAuthenticationService' could not be found (are you missing a using directive or an assembly reference?)
Error 6 The type or namespace name 'IMembershipService' could not be found (are you missing a using directive or an assembly reference?)
These errors seem to come from the HomeControllerTest and the AccountControllerTest.
Any ideas what the problem could be?
Please note that i recently installed Azure Tools using the Web Installer..Dunno if that could be the cause or problem.
Thanks
error code
Tiberius
Member
75 Points
54 Posts
Re: The type or namespace name 'Controllers' does not exist in the namespace 'XXX' error in VS20...
Jan 23, 2010 05:20 PM|LINK
Check the simple things first. Do those types exist in those namespaces? e.g. it's complaining that you don't have a Controllers in xxx. So, go to your controllers and what namespace are they in? Did you add say a company id in front of them? So now they're in yyy.xxx.Controllers?
imran_ku07
All-Star
45785 Points
7698 Posts
MVP
Re: The type or namespace name 'Controllers' does not exist in the namespace 'XXX' error in VS20...
Jan 25, 2010 05:40 AM|LINK
make sure the necessary assemblies present in your Reference,like, you Project Dll, System.Web.Mvc.dll and so on
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
KeFang Chen ...
Star
8329 Points
852 Posts
Re: The type or namespace name 'Controllers' does not exist in the namespace 'XXX' error in VS20...
Jan 25, 2010 07:19 AM|LINK
Hi,
It seems that there is a unit test project in your application and now there is some issue for the project,not your main project.
So the easies way is to exclude the unit test project in your solution. Then try to build it again.
If everything was ok after you excluded the test project, you'd better check the code according to the hint information provided by the complier.
Tom A.
Member
7 Points
6 Posts
Re: The type or namespace name 'Controllers' does not exist in the namespace 'XXX' error in VS20...
May 13, 2010 02:28 PM|LINK
Hi,
I know it has been some time since your original post but I just had the same problem. The solution was to add a reference in the test project to reference the main project.
I hope that helps someone having the same issue.
Thanks,
Tom
sidshetye
Member
9 Points
4 Posts
Re: The type or namespace name 'Controllers' does not exist in the namespace 'XXX' error in VS20...
Nov 19, 2012 08:06 AM|LINK
I had the same error. I already had the appropriate assembly reference so it was tricky. The solution:
Make sure the .NET framework version targeted are compatible! I was trying to add a .NET 4.5 .dll into a .NET 4.0 project and that just didn't work until I upgraded the 4.0 => 4.5.