SQL Server 2016:为程序集“System.ServiceModel"创建程序集失败 [英] SQL Server 2016: CREATE ASSEMBLY for assembly 'System.ServiceModel' failed

查看:37
本文介绍了SQL Server 2016:为程序集“System.ServiceModel"创建程序集失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的一个项目导入 System.ServiceModel.dll 以获得以下内容:

I am trying to import System.ServiceModel.dll for one of my projects in getting the following:

为程序集System.ServiceModel"创建程序集失败,因为程序集microsoft.visualbasic.activities.compiler"格式错误或不是纯 .NET 程序集.

CREATE ASSEMBLY for assembly 'System.ServiceModel' failed because assembly 'microsoft.visualbasic.activities.compiler' is malformed or not a pure .NET assembly.

SQL Server 在 Windows Server 2012 R2 上运行.

SQL Server is running on Windows Server 2012 R2.

是否有解决此问题的方法?

Is there a fix for this issue?

我知道 SQL Server 2012 有类似问题吗?SQL Server 2014 怎么样?

I am aware of similar issues with SQL Server 2012? How about SQL Server 2014?

提前致谢

推荐答案

不,没有允许加载 ServiceModel 的修复程序.问题在于它是一个不受支持的 .NET Framework 库.该库在 SQL Server 2005、2008 和 2008 R2 中确实有效,因为它们链接到 CLR 2.0 版.但是,由于它不在支持"列表中,因此无法保证它适用于所有 .NET Framework 升级.因此,虽然它曾经是纯 MSIL 程序集,但他们将其更改为混合模式程序集,从 SQL Server 2012 开始,这些程序集无法加载到 SQL Server 中.

No, there is no fix that will allow for loading ServiceModel. The problem is that it is an unsupported .NET Framework library. This library did work in SQL Server 2005, 2008, and 2008 R2 as they were linked to CLR version 2.0. However, since it is not in the "supported" list, it was never guaranteed to work across all .NET Framework upgrades. Hence, while it used to be a pure-MSIL Assembly, they changed it to be a mixed-mode Assembly, and those cannot be loaded into SQL Server, starting with SQL Server 2012.

此问题已在此处的 Stack Overflow 上记录:

This issue has been documented on Stack Overflow here:

SQL CLR - 从 2008 R2 迁移到 2012.

(不可修复)程序集存在于 SQL Server 2014 上,但它声称它没有

更多信息在这里:

SQL Server 自定义 CLR 失败并显示错误无法加载文件或程序集或其依赖项之一.系统找不到指定的文件."

这篇关于SQL Server 2016:为程序集“System.ServiceModel"创建程序集失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆