I got this error while opening a connection. So i googled for the solution and found that some changes are to be done in config file. But nothing happened after changing it as mentioned.
Then i noticed the error correctly and it was pointing correct MDF file but the path was wrong. Eventhough it was correctly mentioned in Config file.
Solution :
So i went to Properties folder -> Settings.Settings and saw that the connection string was not refreshed in it. Then i manually changed it to point to proper location of MDF file and all went right.
Thanks
Naveen Prabhu