Wednesday, 19 July 2017

Entity Framework: No connection string named 'ImportEntities' could be found in the application config file.

I got this message when writing a PoC application for Azure. The message is quite self explanatory, but the key is WHICH PROJECT TO UPDATE. I have multiple projects, but my startup was a Console Application (for testing).

The solution is to add the setting (in app.config or web.config) to the solution STARTUP PROJECT.

<configuration>
  <connectionStrings>
    <add name="ImportEntities" connectionString="...." />
  </connectionStrings>
</configuration>

No comments:

Post a comment