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:
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 .cs
files 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 Files
and delete all files and folders there.This steps should resolve the problem. Check it out.
This error can occur after installing tangible T4 editor (http://t4-editor.tangible-engineering.com/T4-Editor-Visual-T4-Editing.html). Uninstalling it fixed the problem for me.
/Emil
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With