Article ID: 922672 - View products that this article applies to.
This article describes the support policy for untested Microsoft .NET Framework assemblies in the .NET Framework common language runtime (CLR)-hosted environment in Microsoft SQL Server.
Assembly testing and supportWhen you register an assembly that references an untested .NET Framework assembly in SQL Server, you may receive the following warning message:
The message means that the .NET Framework assembly has not been tested in the SQL Server CLR-hosted environment. Therefore, the assembly is not supported in the SQL Server CLR-hosted environment.
An untested .NET Framework assembly may exit its host process when a critical condition such as low-memory condition occurs. You can use the assembly in the SQL Server CLR-hosted environment at your own risk. However, Microsoft SQL Server Customer Support Services (CSS) will not help you to use and troubleshoot issues that are associated with an unsupported .NET Framework assembly. If CSS determines that a particular unsupported assembly causes SQL Server issues, you may be asked to stop using the assembly. Additionally, you may be asked to stop using the assembly temporarily when CSS troubleshoots a particular SQL Server issue if it is necessary.
Assembly registrationThere are two kinds of .NET assemblies: pure and mixed. Pure .NET assemblies contain only MSIL instructions. Mixed assemblies contain both unmanaged machine instructions and MSIL instructions. Mixed assemblies in general are compiled in a C++ compiler by using the "clr" switch, and also contain machine instructions built from native C++ code.
When you use a .NET Framework assembly that is not in the supported list, you are required to use the CREATE ASSEMBLY statement to register the assembly and the referenced assemblies within SQL Server database. The SQL Server CREATE ASSEMBLY statement lets only pure .NET Framework assemblies be registered. If the assembly or any referenced assembly is not a pure .NET Framework assembly (and, therefore, is a mixed assembly), you receive the following error message:
Msg 6544, Level 16, State 1, Line 2
CREATE ASSEMBLY for assembly '<assembly name>' failed because assembly ‘<assembly name>’ is malformed or not a pure .NET assembly.
Unverifiable PE Header/native stub.
In this case, you cannot use the .NET Framework assembly together with SQL CLR unless the assembly is in the supported list that is documented in this article. Additionally, a .NET Framework assembly can change from a pure assembly to a mixed assembly between versions. If you use an assembly that is not in the supported list, you might have a situation in which the assembly works in one version of the .NET Framework but not in another. This restriction does not apply to the assemblies in the supported list because these assemblies are not required to be registered by using the CREATE ASSEMBLY statement.
Additionally, you must maintain these assemblies after you upgrade the Microsoft .NET Framework. For more information, click the following article number to go to the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/949080/ )Error message when you execute a CLR routine or use an assembly in SQL Server: "Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)"
Assemblies that are supported in a SQL Server CLR-hosted environmentThe following .NET Framework assemblies are supported in a SQL Server CLR-hosted environment:
Article ID: 922672 - Last Review: March 8, 2013 - Revision: 6.0