Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 19, 2012 08:06 AM by sidshetye
Jan 23, 2010 02:55 PM|LINK
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.
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
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
Jan 25, 2010 07:19 AM|LINK
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.
May 13, 2010 02:28 PM|LINK
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.
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.