SQL Server 2016: CREATE ASSEMBLY for assembly '

2019-07-26 07:24发布

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

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

SQL Server is running on Windows Server 2012 R2.

Is there a fix for this issue?

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

Thanks in advance

1条回答
Luminary・发光体
2楼-- · 2019-07-26 07:36

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.

This issue has been documented on Stack Overflow here:

More info here:

查看更多
登录 后发表回答