title: Code first deployment using EF targetting startup project?
body: <p>I'm reposting this question now that I have a clearer picture of the problem.  I say problem as I don't see any logical reason for this behaviour.</p>
  
  <p>I have a solution which contains three projects:</p>
  
  <p><strong>DataLayer project</strong></p>
  
  <p><strong>BusinessLogicLayer project</strong></p>
  
  <p><strong>Win Forms (set as the STARTUP project)</strong></p>
  
  <p>The DataLayer project uses EF 6 and the Oracle Managed Client. I've found that although the enable-migration and add-migration target my DataLayer project successfully (either by setting the default project in the drop down in Package Manager or using the -project flag) the update-database does not.  I actually have to right click my DataLayer project and tell visual studio to set it as the startup project.</p>
  
  <p>From testing it seems update-database in a code first approach is looking for the app.config in the startup project, rather than what is selected as the default project.</p>
  
  <p>I want my project to have a 3 tier architecture, keeping all my database related stuff and EF tucked away in my DataLayer project.  I don't want to have to keep changing the DataLayer project to be the startup project, just to update the database.  Is this normal behaviour, or is there something I'm missing entirely?</p>
  
  <p>Side notes: Using the community edition of VS, tried on two different systems, fresh projects and getting same behaviour.</p>
  
  <p>Thanks in advance!</p>