Wednesday, August 29, 2012

VS 2012 Error : Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=

When I tried to create new Connection in Server Explorer in Visual Studio 2012, I ran into the following error.

Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

When clicked [Test Connection], it was succeeded but when OK button is clicked, I got the [assembly not found] error.

From the error message, we can see there is some missing component in VS 2012 installation.
The assembly in question - Microsoft.SqlServer.Manangement.Sdk.Sfc version 11 - is a component DLL for SMO assemblies (even though SFC was originally created for more ambitious SSMS extension), and it is included in SQL Server 2012 Shared Management Objects.

[SQL 2012 Shared Management Objects]  has dependency on [SQL System CLR types] component, so you have to install SQL Server System CLR Types first.

[SQL Server 2012 System CLR Types] can be found in the middle of SQL 2012 Feature Pack web page ( )

And SharedManagemmentObjects 2012 also can be found in the same SQL 2012 Feature Pack web page
Once both components are installed, I was able to create new Connection.

By the way, as a side note, if you already have SQL Server 2012 installed on the machine, they are supposed to be installed already.

NOTE: This article only talked about VS 2012 and SQL 2012. More people ran into the same issue for other VS / SQL versions. I wrote an additional article for other versions of VS and SQL. Please refer to this article if this article instruction does not work for you.