SQL Server 2012 does not load CLR 4.0 assemblies

I just upgraded to SQL Server 2012 Service Pack 1 (SP1) because I could not load the CLR assemblies from .net 4.0. Now I have both 2008 and 2012 that work on my virtual machine. I try to load assemblies in 2012, but I still get the same unsupported version errors. when i run the following query select * from sys.dm_clr_properties

I see only version 2.0.50727. Prior to the upgrade, I installed .net 4.0. How to get SQL to use .net 4.0 when loading assemblers?

+4
source share
1 answer

Mark this key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\OnlyUseLatestCLR 

it is 0 or 1

If it is 0, change to 1 and restart the computer. Gotta help.

OR

try just disabling and enabling the SQL CLR on SQL2012. Or try disabling both (SQL2008 and SQl2012) and then only enable SQl2012

 sp_configure 'clr enabled', 0; GO RECONFIGURE; GO sp_configure 'clr enabled', 1; GO RECONFIGURE; GO 

OR

you can force SQL Server to load the .NET 4.0 runtime by creating the sqlservr.exe.config file in the Binn folder with the following configuration

 <configuration> <startup> <requiredRuntime version="v4.0"/> </startup> </configuration> 
+1
source

All Articles