I'm creating a new view off of a model.
The error message I am getting is
Error
There was an error running the selected code generator:
'Access to the path
'C:\Users\XXXXXXX\AppData\Local\Temp\SOMEGUID\EntityFramework.dll' is denied'.
I am running VS 2013 as administrator.
I looked at Is MvcScaffolding compatible with VS 2013 RC by command line? but this didn't seem to resolve the issue.
VS2013 C#5 MVC5 Brand new project started in VS 2013.
I checked all my projects and each had the same version of Entity Framework. In my case, the problem was that one of my projects was targeting .Net 4.0 while the rest were .Net 4.5.
Solution:
I am also having this issue with MSVS2013 Update 4 and EF 6.0 The message I was getting was:
I have a model with around 10 classes. I scaffolded elements at the beginning of the project with no problems.
After some days adding functionality, I tried to scaffold another class from the model, but an error was keeping me from doing it.
I have tried to update MSVS from update 2 to update 4, comment out my OnModelCreating method and other ideas proposed with no luck.
As a temporary way to continue with the project, I created a different asp.net project, pasted there my model classes (I am using fluent api, so there is little annotation on them) and successfully created my controller and views.
After that, I pasted back the created classes to the original project and corrected some mistakes (mainly dbset names).
It seems to be working, although I suppose that I will still find mistakes related to relationships between classes (due to the lack of fluent configuration when created).
I hope this helps to other users.
I know i am out late, but it was so frustrating so I hope this may help a little ...
My issue was similar to many experience here, generic error message when trying to add a new view or use scaffolding to add a new controller.
I found out that mvc 5 and ef 6 modelbuilder are not good friends:
My Solution:
1.Comment out modelBuilder in your Context class.
2.Clean Solution, Rebuild Solution.
3.Add view and Controller via scaffolding
4. Uncomment modelbuilder.
Maybe a little unconventional - but it worked! (for me)