title: how to deploy localdb database with app
body: <p>I am ready to finalize a winforms add in I have created for Excel which uses Add-In Express to publish.</p>
  
  <p>This add in uses a sql server localdb database with mdf file.</p>
  
  <p>My primary question is how to deploy the mdf file to target machines. So far, I have manually copied the mdf file to test machine, but when testing the add in it fails to connect to the file (localdb is installed). </p>
  
  <h2>Error message:</h2>
  
  <blockquote>
    <blockquote>
      <p>Exception Source:      .Net SqlClient Data Provider
      Exception Type:        System.Data.SqlClient.SqlException
      Exception Message:     Cannot open database "MyDatabase" requested by the login. The login failed.</p>
    </blockquote>
  </blockquote>
  
  <p>Is it even possible to just drop the mdf onto machine and everything work? If so, is there a guide somewhere that could help. Or do I have to generate the sql scripts to create the database locally? If I do have to generate the SQL scripts, is there a way to roll this up in the Click-Once deployment approach, or I do I need a seperate process?</p>