I have following app.config in my database library project
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<contexts>
<!-- type:(qualified context class name, assembly ) -->
<context type="XXX.XXX.XXX.XXX, XXX.XXX" >
<databaseInitializer type="XXX.XXX.XXX.XXX, XXX.XXX"/>
</context>
</contexts>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="XXX" connectionString="Data Source=XXX;Initial Catalog=Money;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>
</connectionStrings>
And I have a console project use this library. The problem is that it will connect to the localDB not the database I set in the library project app.config. Why?
If I set connection string in the console project's config then it works well, but it's not a good solution. Is possible to let the library project use it own config?