3

I've been struggling for some time now to be able to use the built-in functions in Visual Studio 2008 to handle *.mdf database files with SQL Server 2008 Express. I'm running on an x64-based system, and I've read that there is a known problem with this setup, but the hotfix has not solved my problems.

Basically, what happens is that when I try to add a new *.mdf file to the App_Data folder of a project, I get an error message saying:

Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to 
function properly.  Please verify the installation of the component or download 
from the URL:    http://go.microsoft.com/fwlink/?LinkId=49251

My (unsuccessful) steps to solve this:

  1. Uninstall all possible associated programs to Visual Studio, SQL Server or .NET Framework (which left .NET 2.0 Compact Framework and .NET 3.5 Compact Framework, and nothing else .NET related, installed).
  2. Reboot.
  3. Install .NET 3.5 SP1, SQL Server 2008 Express and SQL Server Management Studio 2008 Express via the Web Platform Installer 2.0 (Beta).
  4. Reboot.
  5. Install Visual Studio 2008 Professional from disc.
  6. Reboot.
  7. Install Visual Studio 2008 Service Pack 1.
  8. Reboot.
  9. Install hotfix.
  10. Reboot.
  11. Start VS, create new Web site and try to add database. Still get the error message...

When I look in the Help/About dialog, the hotfix shows up among applied updates. I have also checked and double-checked that the SQL Server instance name is correctly set in Visual Studio (I copy-pasted the instance name from the login screen in SSMS).

Why does the hotfix not solve my problems? Am I doing things in the wrong order, or do I have the wrong software versions somewhere?

According to the KB article, the problem is that Visual Studio doesn't correctly detect "some registry keys" - but nothing is said about which keys. Does anyone know how to fix this manually?


Oh, and yes - I've seen this post. I know I could just "downgrade" to the x86 version of SQL Server, but I really want to make this work with the x64 version (if nothing else, just because it's supposed to work...), so that solution doesn't really solve my problems. Please don't close this as a duplicate.

Tomas Aschan
  • 156
  • 1
  • 1
  • 10
  • 1
    Note: I asked this question on stackoverflow first, and was forwarded here. Now some more people has commented and said that it maybe fits better in there than here anyway... Well, I'll just hope any of you guys can solve it =) – Tomas Aschan Jun 08 '09 at 13:03
  • I have never gotten that thing to work, I'm not sure a hotfix that requires a request is a good idea as it will not be throuroughly tested yet - so just bite the bullet and go x86. Alas, have you tried deleting the sql express data folders in the user profile first? That one always gets in the way even when you do the downgrade and I don't recall if the error message is the same or not... – Oskar Duveborn Jun 12 '09 at 12:16

3 Answers3

1

Just out of curiousity what are you getting out of developing in VS against a local x64 SQL Server ?

It's generally accepted that developing databases for x86 should be identical as for that for x64. Thus you should be able to run x86 SQL Server Express and not lose anything.

Lastly have you tried Visual Studio 2010?

Joel Mansford
  • 985
  • 1
  • 5
  • 13
  • It's not so much developing against an x64 server as the fact that I paid for an x64 environment, and now I don't get to use it. I have, however, found the situation so bizarre that I decided it wasn't worth my time to figure out how to get that working. I uninstalled all of it and installed SQL Server 2005 Express. It's not what I wanted, but it works, and doesn't fire error messages on me. And lastly, no - I haven't yet. – Tomas Aschan Jun 16 '09 at 09:15
0

Did you have any pre-prod releases of software (i.e. .NET framework, SQL, Visual Studio) on your system prior to VS? I know that Visual Studio had a bug that couldn't connect because of CTP/beta products on system. Another thing that drives me nuts is installing stuff in proper order in regards to VS products and .NET framework.

SQLChicken
  • 1,307
  • 8
  • 10
  • I did (as I noted in the original post) have a couple of .NET and SQL related products installed, but none of them were CTP/Beta - except for the Web Platform Installer itself (but I don't see how that would affect VS...). The list in the original post is complete - that's exactly what I did. – Tomas Aschan Jun 10 '09 at 10:24
0

VS 2008 has an option to install SQL Server 2008 Express with it. I would try blowing away all things SQL/VS 2008 related (yes, again...) and reinstall VS2008 with the option selected to also install SQL 2008 Express.

squillman
  • 37,618
  • 10
  • 90
  • 145