Problem –
Trying to open MDF file getting –
“Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. ” 

Answer –

In Server Explorer . Right click the MDF file .
Click modify connection.
On the Advanced Tab of the modify connection, scroll down and look for ‘User Instance’ property. Set to ‘False’.

Same thing if you are creating a new instance of MDF .
After creation make the modification described above.