title: How to migrate Entity Framework DB on publish via MsDeploy
body: <p>For my current project i would prefer to update my database to the correct version on publish instead of first run via the App_Start. </p>
  
  <p>It seems that there is support for manual upgrades via a commandline tool 'migrate.exe' which is supplied together with Entity Framework (5.0 rc2). But i can not find any information about how other people have combined this tool together with msdeploy to upgrade the database on publish instead of first run.</p>
  
  <p>I have found the following page which explains how to use the migrate.exe tool:
  <a href="http://blog.overridethis.com/blog/post/2012/03/13/Automating-EF-43x-Data-Migrations-in-your-Build.aspx">http://blog.overridethis.com/blog/post/2012/03/13/Automating-EF-43x-Data-Migrations-in-your-Build.aspx</a></p>
  
  <p>But this forces me to somehow 'know' the connectionstring information. </p>
  
  <p>My optimal solution would be something like:</p>
  
  <ol>
  <li>connectionstring is configured in setParameters.xml file for
  replacement on publish </li>
  <li>on publish after publish of codebase
  migrate.exe gets called with correct connectionstring</li>
  </ol>
  
  <p>It seems that what i search for is an 'entity framework MSDeploy provider'  (see: <a href="http://blogs.msdn.com/b/adonet/archive/2012/01/12/ef-4-3-beta-1-released.aspx">http://blogs.msdn.com/b/adonet/archive/2012/01/12/ef-4-3-beta-1-released.aspx</a>) but it seems that they abandoned that option some time ago</p>