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
I have 2 projects A and B each project has its own database and
Share
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.