The type initializer for threw an exception in entity framework model?

.net entity-framework

Question

I have 2 projects A and B
each project has its own database and connect to it using entity framework and each project is working well alone
My problem is that when I use the project B as a library inside the project A It gives me "The type initializer for (MYCLASS) threw an exception"
you should know that (MYCLASS): is an Entity inside the project B

1
0
6/29/2012 10:39:36 PM

Popular Answer

Check if both projects are referring to the same version of entityframework in app.config. You might have upgraded your ef dlls in your project B but not in your project A. Since you have made reference of B in A, entityframework is using the config in A for both projects.

2
11/6/2012 9:32:58 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow