Check if SQL CLR is enabled:-
select * from sys.configurations where name = 'clr enabled'
Enable SQL CLR:-
EXEC sp_configure 'show advanced options' , '1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled' , '1'
go
reconfigure;
-- Turn advanced options back off
EXEC sp_configure 'show advanced options' , '0';
go