This error occurs when you haven’t set the correct value in your config or when you have one project calling another project. How? Why? Let’s see the details!

If you have one project with its Entity Framework access to your database and you call this from another project, you can find out this error “No connection string named ‘MyEntities’ could be found in the application config file“.

Since the framework loads and uses the configuration file(s) for the executing assembly, you have to copy the connections string to the .config file in the second project. Further, if the error is still existing, try installing the Entity Framework in dlls in your second project with this nuget command: “Install-Package EntityFramework”.

Advertisements