Troubleshooting .NET Framework DLL Assembly Signing Issues in SQL Server

Views: 436
Reading Time: 2 minutes

Hello people,
Good afternoon!

In this post I will show you how to quickly resolve .NET Framework DLL Assembly signing issues in SQL Server. This error occurs when any SQLCLR routine uses some server .NET Framework DLL and after some system update, the CLR user loses Unsafe Assembly permissions or some DLL is updated.

Problem Statement

When this error occurs, all of your CLR SP's that use the affected DLL will display the error message below:

Could not load file or assembly or one of its dependencies. Assembly in host store has a different signature than assembly in GAC (Exception from HRESULT: 0x80131050)

SQLCLR Assembly Error - Execute Procedure

Solution

To resolve this signature issue, let's reassign the Unsafe Assembly permission to the CLR user and then change the assembly of DLLs that are experiencing an error pointing to the DLL our CLR routine expects.

From now on, we can use our SP again:
SQLCLR Assembly Error - How to Fix

That's it folks!
To the next!

sql server, sql, Could not load file or assembly or one of its dependencies. Assembly in host store has a different signature than assembly in GAC (Exception from HRESULT: 0x80131050), assembly, gac

sql server, sql, Could not load file or assembly or one of its dependencies. Assembly in host store has a different signature than assembly in GAC (Exception from HRESULT: 0x80131050), assembly, gac