Error in Adding CLR assembly of .net framework 5.0 in SQL Server 2019.
I have a DLL which uses .NET Framework v5.0. and I want to add it to SQL Server 2019 using CREATE ASSEMBLY.
Is it possible to to add .NET Framework 5.0 and .net core 3.1 Assembly to SQL Server 2019?
Actually when I tried it gives the following error.
Assembly 'EncryptionDecryptionApp' references assembly 'system.runtime, version=4.2.1.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
I tried following code to remove it. But it didn't work for me.
ALTER DATABASE [Taasks] SET TRUSTWORTHY ON;
go
sp_configure 'clr enabled', 1;
RECONFIGURE;
CREATE ASSEMBLY [abc] AUTHORIZATION [dbo]
FROM 'C:\Dlls\EncryptionDecryptionApp.dll'
WITH PERMISSION_SET = EXTERNAL_ACCESS
