Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Not connecting to SQL through Visual Studio 2008

Author  Topic 

mikebennett
Starting Member

2 Posts

Posted - 2008-06-15 : 13:02:02
This should be simple - using the server explorer I select the server and then the database that's running on that server. It lets me test the database connection at that point - which does work.

Then when I try to add the database it says -

Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0 ... The system cannot find the file specified.

So far as I can see the specified file is Microsoft.SqlServer.Smo.dll which has a current version of 9.0.242.0 and sits within the SQL Server files. That is also the version number held in the registry.

The version of SQL is 2005. The database was created using Create Database through VS 2008, .net 3.5.

Also, I installed VS 2008 first, which puts in SQL Compact. And then tried installing SQL 2005 Development which still gave the same error message. So I uninstalled SQL Compact and SQL 2005. And then did a clean install of SQL 2005 Developer. Does VS 2008 cope with this?

Is there a version 10 of SMO? Or is there somewhere within SQL or Visual Studio where it could be holding a version number of 10 for the dll? Or any other ideas?

Thanks Mike

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-15 : 19:40:32
Can you connect to sql2k5 with ssms?
Go to Top of Page

mikebennett
Starting Member

2 Posts

Posted - 2008-06-16 : 03:32:45
Yes, no probs - and also connects completely inside VS 2005 - and the test connection works inside VS 2008.
Go to Top of Page
   

- Advertisement -