[.net] Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0

I have installed MS SQL Server 2008 R2 and when I try to update model from database under EDMX file I am facing that error.

Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0

I have tried to install Microsoft SQL Server 2008 R2 Shared Management Objects from here but no joy.

The answer is


Problem: (Sql server 2014) This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0 not found by visual studio.

Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=42295 and download:

  • ENU\x64\SharedManagementObjects.msi for X64 OS or
  • ENU\x86\SharedManagementObjects.msi for X86 OS,

then install it, and restart visual studio.

PS: You may need install DB2OLEDBV5_x64.msi or DB2OLEDBV5_x86.msi too.


Problem: (Sql server 2012) This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 not found by visual studio.

Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=35580 and download:

  • ENU\x64\SharedManagementObjects.msi for X64 OS or
  • ENU\x86\SharedManagementObjects.msi for X86 OS,

then install it, and restart visual studio.


Problem: (Sql server 2008) This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 10.0.0.0 not found by visual studio.

Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=26728 and download:

  • 1033\x64\SharedManagementObjects.msi for X64 OS or
  • 1033\x86\SharedManagementObjects.msi for X86 OS,

(In most cases downloading this is better http://go.microsoft.com/fwlink/?LinkId=123708&clcid=0x409)

then install it, and restart visual studio.


Problem: I recently got similar problem after installing SharedManagementObjects. assembly Microsoft.SqlServer.ConnectionInfo, Version=12.0.0.0 not found by visual studio. The problem was Visual C++ Redistributable Packages for Visual Studio was not installed yet.

Solution: for Visual Studio 2013 just go to http://www.microsoft.com/en-us/download/details.aspx?id=40784 and download:

  • vcredist_x64.exe for X64 OS or
  • vcredist_x86.exe for X86 OS,

then install it, and restart visual studio.

PS: You can find Visual C++ Redistributable Packages for Visual Studio 20XX for other versions of Visual Studio easily by googling it.


Just want to share my experience on this.

I, too, encountered this error. I'm using MS Visual Studio 2013 and I have an MS SQL Server 2008, though I have had MS SQL Server 2012 Installed before.

I was banging my head on this error for a day. I tried installing SharedManagementObject, SQLSysClrTypes and Native Client, but it didn't work. Why? Well I finally figured that I was installing 2008 or 2012 version of the said files, while I'm using Visual Studio 2013!! My idea is since it is a database issue, the version of the files should be the same with the MS SQL Server installed on the laptop, but apparently, I should have installed the 2013 version because the error is from the Visual Studio and not from the SQL Server.


I am using Visual Studio 2013 & SQL Server 2014. I got the below error Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 not found by visual studio.

I was actually expecting Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0 error because I am using SQL Server 2014.

To fix the issue, I had to install SQL Server 2012's SharedManagementObject.msi from the below site.

http://www.microsoft.com/en-us/download/details.aspx?id=35580

Note: You can use https://stackoverflow.com/a/19246011/1030460 answer but focus on the error version to select the download instead of focusing on SQL Server version.


I am running VS 2012, and SQL Server 2008 R2 SP2, Developer Edition. I ended up having to install items from the Microsoft® SQL Server® 2012 Feature Pack. I think that the install instructions noted that these items work for SQL Server 2005 through 2012. I don't know what the exact requirements are to fix this error, but I installed the three items, and the error stopped appearing.

Microsoft® SQL Server® 2012 Feature Pack Items

  • Microsoft® SQL Server® 2012 Shared Management Objects : x86 , x64
  • Microsoft® System CLR Types for Microsoft® SQL Server® 2012 : x86 , x64
  • Microsoft® SQL Server® 2012 Native Client : x86 , x64

Based on threads elsewhere, you may not end up needing the last item or two. Good luck!


For SQL Server 2014:

http://www.microsoft.com/en-us/download/confirmation.aspx?id=42295

Select SharedManagementObjects.msi for your architectur


For those who are running into a slight variation of this problem, I just found a solution.

Pre-requisites: using VS 2015 and SQL Server 2012.

Symptom: can't load this subsystem: Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0

At this point you might be like me and confused that you are using SQL Server 2012 but VS 2015 is trying to use version 12.0.0.0, which comes from SQL Server 2014. It turns out that when you install SQL Server 2012, it installs a couple of components from SQL Server 2014. At one point I removed all traces of SQL Server from my machine (using the Add Programs control panel). When I re-installed SQL Server 2012, it either didn't re-install the 2014 components or I deleted them again thinking I missed them the first time around.

The result was that I didn't have the necessary 2014 libraries on my system. I also tried to install the 2014 Shared Management Objects as pointed out above, but that didn't work because I didn't have the CLR runtime from 2014. So in order to get a VS 2015 system working with a SQL Server 2012, you have to make sure that these two 2014 packages are installed:

  • ENU\x64\SQLSysClrTypes.msi
  • ENU\x64\SharedManagementObjects.msi

from SQL Server 2014 Feature Pack. Pick the 32 bit versions if you need to.

Here is the site that helped me figure this out.


Just use MS Web platform Installer 4.5 to install all stuff for MS SQL Server 2008 R2.

And don't forget to reload machine.

:)


I downloaded "Microsoft® System CLR Types for Microsoft® SQL Server® 2012" and "Microsoft® SQL Server® 2012 Shared Management Objects" from @ImanMahmoudinasab mentioned link, but Shared Management Objects had problem while installing and it showed some dependencies message and at the end installation Failed!

Finally I solved the problem with Power Shell. I run PS as administrator with the below command:

Start-Process <path>\SharedManagementObjects.msi

for version 11 download the Microsoft SQL Server 2012 Feature Pack https://www.microsoft.com/en-us/download/confirmation.aspx?id=43339

  • ENU\x64\SQLSysClrTypes.msi
  • ENU\x64\SharedManagementObjects.msi

for version 12 download the Microsoft SQL Server 2014 SP2 Feature Pack https://www.microsoft.com/en-us/download/details.aspx?id=42295

  • ENU\x64\SQLSysClrTypes.msi
  • ENU\x64\SharedManagementObjects.msi

I am using Visual Studio 2013 & SQL Server 2014. I got the below error Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 not found by visual studio. I have tried all the things like installing

  • ENU\x64\SharedManagementObjects.msi for X64 OS or

  • ENU\x86\SharedManagementObjects.msi for X86 OS

  • ENU\x64\SQLSysClrTypes.msi

  • Reinstalling Sql Server 2014

What actually solved my problem is to repair the visual studio 2013(or any other version you are using) now the problem is removed . What i think it is problem of Visual Studio not Sql Server as i was able to access and use the Sql Server tool.


Supplement to Iman Mahmoudinasab's answer

For SQL Server 2016, this is where to find the files:

https://www.microsoft.com/en-us/download/details.aspx?id=52676

Note that the files are in the list but you may need to scroll down to see/select it.

From SQL Server 2017 onwards, things change:

"Beginning with SQL Server 2017 SMO is distributed as the Microsoft.SqlServer.SqlManagementObjects NuGet package to allow users to develop applications with SMO."

Source: https://docs.microsoft.com/en-us/sql/relational-databases/server-management-objects-smo/installing-smo?view=sql-server-2017


I got this error when using Visual Studio 2013 with Microsoft SQL Server Management Studio 2016 trying to update database with Entity Framework migrations

The fix was to install Microsoft SQL Server Management Studio 2012 SP1 as Visual Studio 2013 was missing the necessary libraries to connect to the SQL Server database.

I put together this detailed page with all the steps I took.


Questions with .net tag:

You must add a reference to assembly 'netstandard, Version=2.0.0.0 How to use Bootstrap 4 in ASP.NET Core No authenticationScheme was specified, and there was no DefaultChallengeScheme found with default authentification and custom authorization .net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible Update .NET web service to use TLS 1.2 EF Core add-migration Build Failed What is the difference between .NET Core and .NET Standard Class Library project types? Visual Studio 2017 - Could not load file or assembly 'System.Runtime, Version=4.1.0.0' or one of its dependencies Nuget connection attempt failed "Unable to load the service index for source" Token based authentication in Web API without any user interface How to decode JWT Token? What's the difference between .NET Core, .NET Framework, and Xamarin? .NET Core vs Mono How to specify the port an ASP.NET Core application is hosted on? WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery Why is the Visual Studio 2015/2017/2019 Test Runner not discovering my xUnit v2 tests Build error, This project references NuGet IIS Config Error - This configuration section cannot be used at this path There is no argument given that corresponds to the required formal parameter - .NET Error Could not find a part of the path ... bin\roslyn\csc.exe Can you install and run apps built on the .NET framework on a Mac? What is the purpose of nameof? Microsoft.ReportViewer.Common Version=12.0.0.0 What is the default value for Guid? Authentication failed because remote party has closed the transport stream What is the difference between a Shared Project and a Class Library in Visual Studio 2015? How to break out of the IF statement No connection could be made because the target machine actively refused it 127.0.0.1 Default SecurityProtocol in .NET 4.5 How to properly make a http web GET request What is ".NET Core"? IOException: The process cannot access the file 'file path' because it is being used by another process System.web.mvc missing Disable SSL fallback and use only TLS for outbound connections in .NET? (Poodle mitigation) SQL Connection Error: System.Data.SqlClient.SqlException (0x80131904) Write to Windows Application Event Log Operator overloading ==, !=, Equals System.Net.WebException: The remote name could not be resolved: Running multiple async tasks and waiting for them all to complete What is an "index out of range" exception, and how do I fix it? Found conflicts between different versions of the same dependent assembly that could not be resolved Getting the first and last day of a month, using a given DateTime object Error 1053 the service did not respond to the start or control request in a timely fashion BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed Download files from SFTP with SSH.NET library An object reference is required to access a non-static member AppendChild() is not a function javascript Send JSON via POST in C# and Receive the JSON returned? Why is HttpClient BaseAddress not working? KERNELBASE.dll Exception 0xe0434352 offset 0x000000000000a49d

Questions with visual-studio tag:

VS 2017 Git Local Commit DB.lock error on every commit How to remove an unpushed outgoing commit in Visual Studio? How to download Visual Studio Community Edition 2015 (not 2017) Cannot open include file: 'stdio.h' - Visual Studio Community 2017 - C++ Error How to fix the error "Windows SDK version 8.1" was not found? Visual Studio Code pylint: Unable to import 'protorpc' Open the terminal in visual studio? Is Visual Studio Community a 30 day trial? How can I run NUnit tests in Visual Studio 2017? Visual Studio 2017: Display method references Visual Studio 2017 errors on standard headers Where is NuGet.Config file located in Visual Studio project? Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state Visual Studio 2017 - Git failed with a fatal error Unity Scripts edited in Visual studio don't provide autocomplete Equivalent to AssemblyInfo in dotnet core/csproj How to enable C++17 compiling in Visual Studio? Nuget connection attempt failed "Unable to load the service index for source" Change language of Visual Studio 2017 RC Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies Visual Studio Code how to resolve merge conflicts with git? Getting "project" nuget configuration is invalid error "Object doesn't support property or method 'find'" in IE localhost refused to connect Error in visual studio Why is the Visual Studio 2015/2017/2019 Test Runner not discovering my xUnit v2 tests Build error, This project references NuGet Visual Studio Code always asking for git credentials Stuck while installing Visual Studio 2015 (Update for Microsoft Windows (KB2999226)) Visual Studio error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015 C# - How to convert string to char? Multiple Errors Installing Visual Studio 2015 Community Edition Why Visual Studio 2015 can't run exe file (ucrtbased.dll)? Where can I read the Console output in Visual Studio 2015 Go To Definition: "Cannot navigate to the symbol under the caret." CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found How to remove error about glyphicons-halflings-regular.woff2 not found NuGet Packages are missing Visual Studio Community 2015 expiration date How to solve ERR_CONNECTION_REFUSED when trying to connect to localhost running IISExpress - Error 502 (Cannot debug from Visual Studio)? Where is the visual studio HTML Designer? error C4996: 'scanf': This function or variable may be unsafe in c programming What are the differences between Visual Studio Code and Visual Studio? Is Xamarin free in Visual Studio 2015? What's the difference between Visual Studio Community and other, paid versions? Visual Studio 2015 installer hangs during install? How to use class from other files in C# with visual studio? 'cannot find or open the pdb file' Visual Studio C++ 2013 How to build x86 and/or x64 on Windows from command line with CMAKE? Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions How to enable C# 6.0 feature in Visual Studio 2013?

Questions with sql-server-2008-r2 tag:

A connection was successfully established with the server, but then an error occurred during the login process. (Error Number: 233) Rebuild all indexes in a Database How to get last 7 days data from current datetime to last 7 days in sql server Get last 30 day records from today date in SQL Server what is numeric(18, 0) in sql server 2008 r2 Conversion failed when converting date and/or time from character string in SQL SERVER 2008 'MOD' is not a recognized built-in function name How to Convert datetime value to yyyymmddhhmmss in SQL server? SQL Server stored procedure Nullable parameter SQL Server 2008 R2 can't connect to local database in Management Studio T-SQL split string based on delimiter SQL Server procedure declare a list SQL Server r2 installation error .. update Visual Studio 2008 to SP1 How to automatically generate unique id in SQL like UID12345678? How to restore a SQL Server 2012 database to SQL Server 2008 R2? CASE WHEN statement for ORDER BY clause Convert NVARCHAR to DATETIME in SQL Server 2008 How to query for Xml values and attributes from table in SQL Server? How to find difference between two columns data? Exit single-user mode Select query to remove non-numeric characters DateTime fields from SQL Server display incorrectly in Excel Select SQL Server database size How to restore SQL Server 2014 backup in SQL Server 2008 Find the last time table was updated Get AVG ignoring Null or Zero values The service cannot be started, either because it is disabled or because it has no enabled devices associated with it SQL Server Jobs with SSIS packages - Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 Error on renaming database in SQL Server 2008 R2 What is the syntax meaning of RAISERROR() SQL Server - Create a copy of a database table and place it in the same database? Convert YYYYMMDD to DATE Create a view with ORDER BY clause How to convert the system date format to dd/mm/yy in SQL Server 2008 R2? How to remove white space characters from a string in SQL Server Stored Procedure parameter default value - is this a constant or a variable Using IF ELSE statement based on Count to execute different Insert statements SQL Update with row_number() Connection failed: SQLState: '01000' SQL Server Error: 10061 Search of table names Calculating distance between two points (Latitude, Longitude) Remote Procedure call failed with sql server 2008 R2 sql server convert date to string MM/DD/YYYY Recover sa password Partition Function COUNT() OVER possible using DISTINCT fastest way to export blobs from table into individual files Error: Specified cast is not valid. (SqlManagerUI) How to find out what is locking my tables? Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

Questions with entity-framework-5 tag:

Entity Framework Join 3 Tables The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception Entity Framework (EF) Code First Cascade Delete for One-to-Zero-or-One relationship Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 EF LINQ include multiple and nested entities Entity Framework 5 Updating a Record Non-static method requires a target How do I enable EF migrations for multiple contexts to separate databases? After updating Entity Framework model, Visual Studio does not see changes Entity Framework Migrations renaming tables and columns How to include a child object's child object in Entity Framework 5