I had faced same issue when I deployed my software on test machine.
Solution:
Check the SQL server version using which the .mdf was build.
If you don't know execute command SELECT @@VERSION.
Install correct version of SqlLocalDB.msi from following link.
http://www.microsoft.com/en-us/download/details.aspx?id=29062
http://www.microsoft.com/en-my/download/details.aspx?id=42299.