I just want to quickly spin up the default database in my development environment.
How is the easiest way to get around this problem?
I once faced this problem and resolved it. The key is using SQL authentication instead of Windows'. This is the clearest way to specify the default db.
Try connection string in this way:
<add name="MFCConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MFC.mdf;Initial Catalog=MFC;Integrated Security=false;User ID=sa;Password=123" providerName="System.Data.SqlClient" />
remember to set default db of sa from master to MFC, and Integrated security = false. BTW, sa is normally disabled, so enable and test it in sql server management studio first.