1

I have SQL Server 2014 installed. When I'm attempting to create a data connection within Visual Studio Express 2013 for Windows Desktop it's giving me the below error.

Unable to add data connection. Could not load file or assembly. Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0, Culture=neutral, PublicKeyToken=[key] or one of its .dependancies. The system cannot find the file specified.

I have downloaded and installed both the .msi files advised in this answer.

Although the answer states that with SQL Server 2014 you should receive the error message stating Version=12.0.0.0, however I'm receiving the error message showing Version=11.0.0.0. Should I maybe download and install the ENU\x64\SharedManagementObjects.msi for SQL Server 2012?

Checking C:\Windows\assembly shows that Microsoft.SqlServer.Management.Sdk.Sfc is installed as version 12.0.0.0.

Community
  • 1
  • 1
luke_t
  • 2,935
  • 4
  • 22
  • 38
  • Do you get that error during runtime or when you try to reference the assembly? – CalebB Jul 20 '15 at 21:31
  • Once I've input the SQL Server name, and chosen the database name, I click 'Test Connection', which returns 'Test connection succeeded'. Then when pressing 'ok' to create the connection it throws the error detailed above. Thanks. – luke_t Jul 20 '15 at 21:35
  • That's basically pinging the server and database to see if it's there when testing the connection. Are you including the username and password in the connection string? – CalebB Jul 20 '15 at 21:42
  • I'm using Windows Authentication at present. – luke_t Jul 20 '15 at 21:43
  • Alright take a look at [this related question](http://stackoverflow.com/questions/23479366/cannot-connect-to-sql-server-express-2014-from-visual-studio-2012) it looks like you need to install the latest updates for the sql server tools. – CalebB Jul 20 '15 at 21:59
  • Just downloaded and installed SQL Server database tools. Still getting the error described in my original post. – luke_t Jul 20 '15 at 22:22
  • Try [this](http://stackoverflow.com/questions/16906686/could-not-load-file-or-assembly-microsoft-sqlserver-management-sdk-sfc-version-1) You may need to update your C++ redistributable pack. (link in question's accepted answer) – CalebB Jul 20 '15 at 22:31
  • Again, no luck with that. I ended up downloading `ENU\x64\SharedManagementObjects.msi` for SQL Server 2012 and this resolved the issue. No idea why I should be using Version 11 with SQL Server 2014, but at least it's now letting me create data connections. Thanks for your help. – luke_t Jul 20 '15 at 22:47

2 Answers2

2

I downloaded ENU\x64\SharedManagementObjects.msi for SQL Server 2012.

It would appear that when using Visual Studio 2013, and SQL Server 2014, it requires version 11.0.0.0 of Microsoft.SqlServer.Management.Sdk.Sfc.

luke_t
  • 2,935
  • 4
  • 22
  • 38
1

For both types (32 bit and 64 bit), this works:

  1. Open URL http://www.microsoft.com/en-us/download/details.aspx?id=35580
  2. Download ENU\x86\SQLSysClrTypes.msi
  3. Download ENU\x86\SharedManagementObjects.msi
  4. Install ENU\x86\SQLSysClrTypes.msi
  5. Install ENU\x86\SharedManagementObjects.msi
  6. Restart your Visual Studio and now Everything will work smooth.

See here.

AdrianHHH
  • 13,492
  • 16
  • 50
  • 87
Milad
  • 11
  • 1