Could not load file or assembly Microsoft.SqlServe

2019-01-01 07:05发布

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.

12条回答
弹指情弦暗扣
2楼-- · 2019-01-01 07:22

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.

查看更多
余生请多指教
3楼-- · 2019-01-01 07:25

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!

查看更多
情到深处是孤独
4楼-- · 2019-01-01 07:26

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.

查看更多
梦醉为红颜
5楼-- · 2019-01-01 07:28

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
查看更多
路过你的时光
6楼-- · 2019-01-01 07:30

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.

查看更多
刘海飞了
7楼-- · 2019-01-01 07:31

For SQL Server 2014:

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

Select SharedManagementObjects.msi for your architectur

查看更多
登录 后发表回答