In a MVC3 project under VS 11, I am using Code First with POCO's and am trying to add a controller. I keep getting the error message "Unable to retrieve metadata for 'MVC3_TestApp.Models.CAS'. The type initializer for 'System.Data.Entity.Internal.AppConfig'
threw an exception." Any ideas what is causing this?
EF 5.0.0.-beta2. Yes, it compiles. It lets me add a controller without a model, but when I try to add one with scaffolding and a model I get the error message.
I work in the the team that builds if and would like to see your project. Will it possible for you to zip your project and upload it somewhere so i can download it?
Did you ever find a solution to this? I'm having a similar issue when trying to add a controller. I get this error message: "Unable to retrieve metadata for ... The given key was not present in the dictionary."
mawernig
0 Points
2 Posts
Problems adding controller
Apr 19, 2012 05:44 AM|LINK
In a MVC3 project under VS 11, I am using Code First with POCO's and am trying to add a controller. I keep getting the error message "Unable to retrieve metadata for 'MVC3_TestApp.Models.CAS'. The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception." Any ideas what is causing this?
Knecke
Contributor
3712 Points
838 Posts
Re: Problems adding controller
Apr 19, 2012 06:06 AM|LINK
Some error in our web.config ?
.NET Developer (ASP.NET, MVC, WPF) MCTS .NET 4 (Web, WCF)
Blog | Twitter
pranav rasto...
Member
286 Points
52 Posts
Re: Problems adding controller
Jun 06, 2012 02:29 PM|LINK
what version of EF are you using? does your app compile before you are adding a controller
mawernig
0 Points
2 Posts
Re: Problems adding controller
Jun 07, 2012 04:56 AM|LINK
EF 5.0.0.-beta2. Yes, it compiles. It lets me add a controller without a model, but when I try to add one with scaffolding and a model I get the error message.
pranav rasto...
Member
286 Points
52 Posts
Re: Problems adding controller
Jun 13, 2012 04:46 AM|LINK
I work in the the team that builds if and would like to see your project. Will it possible for you to zip your project and upload it somewhere so i can download it?
VictorGrippi
Member
6 Points
7 Posts
Re: Problems adding controller
Sep 04, 2012 08:15 PM|LINK
Did you ever find a solution to this? I'm having a similar issue when trying to add a controller. I get this error message: "Unable to retrieve metadata for ... The given key was not present in the dictionary."
VS2010, EF 4.1, MVC3
Any ideas?