Setup a new machine with VS2008 & SQL Server Express 2008 and was surprised when I got the following error when trying to run against an mdf file:
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly
Well I have SQL Server Express 2008 installed! And my other machines don’t have this problem. Next step was to try installing SP1 — doh, that’ll fix it, right? WRONG! Same error.
After 30 min of googling, I stumbled upon this MS article http://support.microsoft.com/kb/957944 . Cause?
This problem occurs because Visual Studio 2008 SP1 incorrectly detects some registry keys for a 64-bit installation of SQL Server Express 2008.
So the issue is that I’m running a 64bit SQL Server instance.
There’s a hotfix too. But there’s no link (it took me 5 min of searching the page to finally figure this out and RTFM) — you have to call MS and have them send it to you. That’s not terrible and it only took my a few min, but it was kind of a pain.
In case you have this issue, you can save yourself some time by dialing the direct number to the department that can help you: 1-800-936-4900.