An ASP.NET MVC error in Visual Studio 2008 and a solution
Posted: (EET/GMT+2)
Happy December! Recently, I've created multiple application with ASP.NET MVC, and overall I really like the new technology. Of course, no technology isn't without its quirks, and ASP.NET MVC is not an exception. Yesterday, I ran into an interesting issue that I hadn't noticed before. When creating a view from a controller action method (right-click and then choose Add View), I got the following error:
Template Processing resulted in 2 Errors --------------------------- c:\Temp\bqqraxkg.0.cs(4,18) : error CS0234: Compiling transformation: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) c:\Temp\bqqraxkg.0.cs(5,18) : error CS0234: Compiling transformation: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)
This seemed only to happen when I added a Details type of view. Although I tried multiple times, this didn't help. Then, I though that maybe there were too many files in the C:\Temp directory. Clearing this directory solved the problem. So, if you run into a similar problem, check where your system environment variable %TEMP% points to, and delete all files from that directory. Then try again.
Hope this helps!