.net 无法加载文件或程序集 Microsoft.SqlServer.management.sdk.sfc 版本 11.0.0.0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16906686/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0
提问by Developer
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.
我已经安装了 MS SQL Server 2008 R2,当我尝试从 EDMX 文件下的数据库更新模型时,我遇到了该错误。
Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0
无法加载文件或程序集 Microsoft.SqlServer.management.sdk.sfc 版本 11.0.0.0
I have tried to install Microsoft SQL Server 2008 R2 Shared Management Objects from herebut no joy.
回答by Iman Mahmoudinasab
Problem:(Sql server 2014) This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0not found by visual studio.
问题:(Sql server 2014)Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0Visual Studio 找不到程序集时会发生此问题。
Solution:just go to http://www.microsoft.com/en-us/download/details.aspx?id=42295and download:
解决方案:只需访问http://www.microsoft.com/en-us/download/details.aspx?id=42295并下载:
ENU\x64\SharedManagementObjects.msifor X64 OS orENU\x86\SharedManagementObjects.msifor X86 OS,
ENU\x64\SharedManagementObjects.msi对于 X64 操作系统或ENU\x86\SharedManagementObjects.msi对于 X86 操作系统,
then install it, and restart visual studio.
然后安装它,并重新启动visual studio。
PS: You may need install DB2OLEDBV5_x64.msior DB2OLEDBV5_x86.msitoo.
PS:您可能需要安装DB2OLEDBV5_x64.msi或DB2OLEDBV5_x86.msi过。
Problem:问题:(Sql server 2012)
Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0Visual Studio 未找到程序集时会发生此问题。Solution:just go to http://www.microsoft.com/en-us/download/details.aspx?id=35580and download:
解决方案:只需访问http://www.microsoft.com/en-us/download/details.aspx?id=35580并下载:
ENU\x64\SharedManagementObjects.msifor X64 OS orENU\x86\SharedManagementObjects.msifor X86 OS,
ENU\x64\SharedManagementObjects.msi对于 X64 操作系统或ENU\x86\SharedManagementObjects.msi对于 X86 操作系统,
then install it, and restart visual studio.
然后安装它,并重新启动visual studio。
Problem:问题:(Sql server 2008)
Microsoft.SqlServer.management.sdk.sfc version 10.0.0.0Microsoft.SqlServer.management.sdk.sfc version 10.0.0.0Visual Studio 找不到程序集时会发生此问题。Solution:just go to http://www.microsoft.com/en-us/download/details.aspx?id=26728and download:
解决方案:只需访问http://www.microsoft.com/en-us/download/details.aspx?id=26728并下载:
1033\x64\SharedManagementObjects.msifor X64 OS or1033\x86\SharedManagementObjects.msifor X86 OS,
1033\x64\SharedManagementObjects.msi对于 X64 操作系统或1033\x86\SharedManagementObjects.msi对于 X86 操作系统,
(In most cases downloading this is better http://go.microsoft.com/fwlink/?LinkId=123708&clcid=0x409)
(在大多数情况下,下载这个更好http://go.microsoft.com/fwlink/?LinkId=123708&clcid=0x409)
then install it, and restart visual studio.
然后安装它,并重新启动visual studio。
Problem:问题:我最近在安装后遇到了类似的问题SharedManagementObjects共享管理对象。
Microsoft.SqlServer.ConnectionInfo, Version=12.0.0.0Microsoft.SqlServer.ConnectionInfo, Version=12.0.0.0Visual Studio 未找到程序集。问题是Visual C++ Redistributable Packages for Visual Studio尚未安装Visual Studio 的 Visual C++ Redistributable Packages。Solution:for Visual Studio 2013 just go to http://www.microsoft.com/en-us/download/details.aspx?id=40784and download:
解决方案:对于 Visual Studio 2013,只需访问http://www.microsoft.com/en-us/download/details.aspx?id=40784并下载:
vcredist_x64.exefor X64 OS orvcredist_x86.exefor X86 OS,
vcredist_x64.exe对于 X64 操作系统或vcredist_x86.exe对于 X86 操作系统,
then install it, and restart visual studio.
然后安装它,并重新启动visual studio。
PS: You can find Visual C++ Redistributable Packages for Visual Studio 20XXfor other versions of Visual Studio easily by googling it.
PS:您可以通过谷歌搜索轻松找到适用于其他版本 Visual Studio 的Visual C++ Redistributable Packages for Visual Studio 20XX。
回答by Gellie Ann
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.
我也遇到了这个错误。我使用的是 MS Visual Studio 2013 并且我有一个 MS SQL Server 2008,尽管我之前安装过 MS SQL Server 2012。
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.
我在这个错误上挣扎了一天。我尝试安装 SharedManagementObject、SQLSysClrTypes 和 Native Client,但没有成功。为什么?好吧,我终于发现我正在安装上述文件的 2008 或 2012 版本,而我正在使用 Visual Studio 2013!!我的想法是因为这是一个数据库问题,文件的版本应该与笔记本电脑上安装的 MS SQL Server 相同,但显然,我应该安装 2013 版本,因为错误来自 Visual Studio 而不是来自SQL 服务器。
回答by Sundeep
I am using Visual Studio 2013 & SQL Server 2014. I got the below error Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0not found by visual studio.
我正在使用 Visual Studio 2013 和 SQL Server 2014。我遇到了以下错误,Visual StudioMicrosoft.SqlServer.management.sdk.sfc version 11.0.0.0未找到。
I was actually expecting Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0error because I am using SQL Server 2014.
我实际上期待Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0错误,因为我使用的是 SQL Server 2014。
To fix the issue, I had to install SQL Server 2012's SharedManagementObject.msifrom the below site.
为了解决这个问题,我必须SharedManagementObject.msi从以下站点安装 SQL Server 2012 。
http://www.microsoft.com/en-us/download/details.aspx?id=35580
http://www.microsoft.com/en-us/download/details.aspx?id=35580
Note:You can use https://stackoverflow.com/a/19246011/1030460answer but focus on the error version to select the download instead of focusing on SQL Server version.
注意:您可以使用https://stackoverflow.com/a/19246011/1030460答案但关注错误版本以选择下载而不是关注 SQL Server 版本。
回答by Will Ediger
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 instructionsnoted 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.
我正在运行 VS 2012 和 SQL Server 2008 R2 SP2,开发人员版。我最终不得不从 Microsoft 安装项目?SQL服务器?2012 功能包。我认为安装说明指出这些项目适用于 SQL Server 2005 到 2012。我不知道修复此错误的确切要求是什么,但我安装了这三个项目,并且错误不再出现。
Microsoft? SQL Server? 2012 Feature Pack Items
微软?SQL服务器?2012 功能包项目
- 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
- 微软?SQL服务器?2012 共享管理对象:x86、x64
- 微软?Microsoft 的系统 CLR 类型?SQL服务器?2012 年:x86、x64
- 微软?SQL服务器?2012 原生客户端:x86、x64
Based on threads elsewhere, you may not end up needing the last item or two. Good luck!
根据其他地方的线程,您可能最终不需要最后一项或两项。祝你好运!
回答by erbaker
For SQL Server 2014:
对于 SQL Server 2014:
http://www.microsoft.com/en-us/download/confirmation.aspx?id=42295
http://www.microsoft.com/en-us/download/confirmation.aspx?id=42295
Select SharedManagementObjects.msi for your architectur
为您的架构选择 SharedManagementObjects.msi
回答by Greg Veres
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.
先决条件:使用 VS 2015 和 SQL Server 2012。
Symptom: can't load this subsystem: Microsoft.SqlServer.management.sdk.sfc version 12.0.0.0
现象:无法加载这个子系统: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.
在这一点上,您可能和我一样困惑,因为您使用的是 SQL Server 2012,但 VS 2015 正在尝试使用来自 SQL Server 2014 的版本 12.0.0.0。事实证明,当您安装 SQL Server 2012 时,它会安装一个SQL Server 2014 中的几个组件。有一次,我从我的机器上删除了 SQL Server 的所有痕迹(使用“添加程序”控制面板)。当我重新安装 SQL Server 2012 时,它要么没有重新安装 2014 组件,要么我认为我第一次错过了它们而再次删除了它们。
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:
结果是我的系统上没有必要的 2014 库。我还尝试安装上面指出的 2014 共享管理对象,但这没有用,因为我没有 2014 年的 CLR 运行时。所以为了让 VS 2015 系统与 SQL Server 2012 一起工作,你必须确保安装了这两个 2014 软件包:
- ENU\x64\SQLSysClrTypes.msi
- ENU\x64\SharedManagementObjects.msi
- ENU\x64\SQLSysClrTypes.msi
- ENU\x64\SharedManagementObjects.msi
from SQL Server 2014 Feature Pack. Pick the 32 bit versions if you need to.
来自SQL Server 2014 功能包。如果需要,请选择 32 位版本。
Here is the sitethat helped me figure this out.
回答by Developer
Just use MS Web platform Installer 4.5 to install all stuff for MS SQL Server 2008 R2.
只需使用 MS Web 平台安装程序 4.5 来安装 MS SQL Server 2008 R2 的所有内容。
And don't forget to reload machine.
并且不要忘记重新加载机器。
:)
:)
回答by Hamid Jolany
for version 11 download the Microsoft SQL Server 2012 Feature Pack https://www.microsoft.com/en-us/download/confirmation.aspx?id=43339
对于版本 11,请下载 Microsoft SQL Server 2012 功能包 https://www.microsoft.com/en-us/download/confirmation.aspx?id=43339
- ENU\x64\SQLSysClrTypes.msi
- ENU\x64\SharedManagementObjects.msi
- 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
对于版本 12,请下载 Microsoft SQL Server 2014 SP2 功能包 https://www.microsoft.com/en-us/download/details.aspx?id=42295
- ENU\x64\SQLSysClrTypes.msi
- ENU\x64\SharedManagementObjects.msi
- ENU\x64\SQLSysClrTypes.msi
- ENU\x64\SharedManagementObjects.msi
回答by PRATEEK GHOSH
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
我正在使用 Visual Studio 2013 和 SQL Server 2014。我收到以下错误 Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 not found by Visual Studio。我已经尝试了所有的东西,比如安装
ENU\x64\SharedManagementObjects.msi for X64 OS or
ENU\x86\SharedManagementObjects.msi for X86 OS
ENU\x64\SQLSysClrTypes.msi
Reinstalling Sql Server 2014
适用于 X64 操作系统的 ENU\x64\SharedManagementObjects.msi 或
适用于 X86 操作系统的 ENU\x86\SharedManagementObjects.msi
ENU\x64\SQLSysClrTypes.msi
重新安装 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.
真正解决我的问题的是修复 Visual Studio 2013(或您正在使用的任何其他版本),现在问题已消除。我认为这是 Visual Studio 的问题,而不是 Sql Server,因为我能够访问和使用 Sql Server 工具。
回答by Radu Bartan
I got this error when using Visual Studio 2013with Microsoft SQL Server Management Studio 2016trying to update databasewith Entity Framework migrations
我使用的时候得到这个错误与试图更新数据库与Visual Studio 2013Microsoft SQL Server Management Studio 2016Entity Framework migrations
The fix was to install Microsoft SQL Server Management Studio 2012 SP1as Visual Studio 2013 was missing the necessary libraries to connect to the SQL Server database.
修复是因为 Visual Studio 2013 缺少连接到 SQL Server 数据库所需的库而安装。Microsoft SQL Server Management Studio 2012 SP1
I put together this detailed page with all the steps I took.
我把这个详细的页面和我采取的所有步骤放在一起。

