When I try to create a view from action method of some controller (right click -> Add View -> select Strongly-typed view) I get the following error:
The templates had the following 2 error(s) when running:
c:\Users(…)\AppData\Local\Temp\b1b5zy30.0.cs(5,33) : error CS0234: Compiling transformation: The type or namespace name ‘DataAnnotations’ does not exist in the namespace ‘System.ComponentModel’ (are you missing an assembly reference?)
c:\Users(…)\AppData\Local\Temp\b1b5zy30.0.cs(6,23) : error CS0234: Compiling transformation: The type or namespace name ‘Linq’ does not exist in the namespace ‘System.Data’ (are you missing an assembly reference?)
Does anyone knows what is going on?
This worked a couple of days ago, and meantime I didn’t made any changes to MVC installation
Thanks
I got same error sometimes.
c:\Users(...)\AppData\Local\Temp\and delete.csfiles in it.%LocalAppData%\Temp\Temporary ASP.NET Files(by typing it Windows-Explorer’s address-bar and Enter) and delete all file and folders there.%WINDIR%\Microsoft.NET\Framework\v(YOUR-VERSION)\Temporary ASP.NET Filesand delete all files and folders there.This steps should resolve the problem. Check it out.