I installed on a Vista x64 machine Visual Studio 2008 SP1 (with integrated SQL from the installation package) and when I try to add an MDF file to a project or to the App_Data when working with web, I get the following message:
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.
Just to make sure: SQL 2005 express is installed and I connect to it via SSMS.
Update: I am 90% sure that this is a Microsoft bug with x64 machines.
Are you sure you installed SQL Server 2005? Try to check your program files folder.
Versions (subfolder):
Also check if the "
SQL Server (SQLEXPRESS)
" service is installed (in services.msc - the Windows Services panel).Visual Studio can't use .MDF files except via SQL Server Express. If you've got SQL Server Standard (or better) installed, you need to connect to the database server, not to the .MDF file.
Depending on the order that you installed things in, SQL Server Express may not have been installed by the Visual Studio installer. Your question implies that you did install SQL Server Express, but then talks about "SQL Server" (which is a different beast).
I know that there is a bug in VS2008 when working with .mdf files on x64 machines but I've only seen this with SQLExpress2008, but maybe they are related.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=361718
Also make sure that the data connections settings are correct in VS under Tools->Options->Database Tools->Data Connections (should be .\sqlexpress)
Check the following:
Uninstall SQL 2005 (most likely got an x64 version which won't work well with VS for some reason. Download the x86 for WoW version of SQL 2005 or 2008 Express (do not use the web installer) and install it. Make sure you've got SP1 for VS2008 if you went with SQL 2008 Express. Then finally delete the old SQL Express data directories in your %localappdata% folder and try it out.
I am not sure if this is your problem, but i post it anyway.
If you install SSE after you install VS, VS may not be pointed at the right instance of SQL Server. The local data functionality (so you can copy around MDFs like MDBs) is associated exclusively with SSE.
(I found this in url below, but it is about VS2005) http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/6503fe05-4d05-49e7-8c2a-b9778ab7e9b8
IM ON WINDOWS 7 ULTIMATE X64 BITS - WITH VS PRO 2008 + NET FRAMEWORK 3.5 SP 1 + SQL SERVER 2005 SP 3 X64 BITS I DONT NOW TO NEED INSTALL SQL SERVER 2008 ITS TOO LATE FOR ME NOW, OK IM ON THE MIDDLE OF ALL THE FORMULAS DESCRIBED ON INTERNET, IF THE HOTFIX AND SP 1 COULDNT FIX THIS ISSUE I WILL VERY HUNGRY CAUSE I HAVE 3 DAYS UPDATING DOWNLOADING ETC....
BTW IV NOTICED THAT ITS READY TO TEST VS 2010 IM GOING BE CRAZY....