Sometimes you have these issues that always appear randomly. You know you have seen these issues before, but you can’t remember how you fixed them .
Today I opened up the project I was working on for the last month to see the following error:
CS0234: The type or namespace name ‘’ does not exist in the namespace ‘System.Web.Mvc’
I first tried all the obvious things when you have such an unexpected error:
- Clean the solution and rebuild the project… Didn’t help
- Restarting Visual Studio… Didn’t help
- Delete everything from the Temporary ASP.NET Files folder… Didn’t help
- Got another coffee at the coffee corner… Didn’t help but I felt a little bit better
Finally I noticed that I had switched between configuration modes. Inside the Debug configuration mode, I noticed that Copy Local was set to False for System.Web.MVC. When I changed Copy Local to True everything was working again.
Wasted one hour…