Problems when trying to auto-generate the views for MVC3, from Controller's Action method?

Up vote 2 down vote favorite share g+ share fb share tw.

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 asp. Net-mvc-3 link|improve this question asked Oct 30 '11 at 3:44bzamfir509310 82% accept rate.

Have you tried to apply the remedy suggested in the error messages i.e. Add reference to System. ComponentModel and System.

Data? – amit_g Oct 30 '11 at 3:52.

I got same error sometimes. Go to c:\Users(...)\AppData\Local\Temp\ and delete . Cs files in it.

Close VS and stop any server (if running -in try icon you'll see the servers that are running), go to %LocalAppData%\Temp\Temporary ASP. NET Files (by typing it Windows-Explorer's address-bar and Enter) and delete all file and folders there. Go to %WINDIR%\Microsoft.

NET\Framework\v(YOUR-VERSION)\Temporary ASP. NET Files and delete all files and folders there. Clean and ReBuild entire solution.

Run it! This steps should resolve the problem. Check it out.

Thanks. It worked – bzamfir Oct 30 '11 at 11:53 You are welcome :D – Javad_Amiry Oct 30 '11 at 12:23.

This error can occur after installing tangible T4 editor (t4-editor.tangible-engineering.com/T4-Ed...). Uninstalling it fixed the problem for me. /Emil.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions