My 32bit .NET application runs SQL 2005 Express SP3 and uses CLR. The install works fine on XP & Vista. The install fails on XP 64bit & Widows 7 64bit machines.
The error is in one of my SQL scripts that creates an Assembly:
Error:
“Execution of .NET Framework code is disabled. Set ‘CLR enabled’ configuration option and restart server. (5847)”
Script Code:
CREATE ASSEMBLY MyCode
FROM ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MyCode.dll’
WITH PERMISSION_SET = UNSAFE
HOWEVER when I check the CLR it is enabled. In fact my very first script turns the CLR On and Trustworthy On.
So again, this all works on 32bit machines but not on 64bit.
Suggestions?
On WoW64 (x86 Express instance installed on x64 host OS) you need to restart the instance for the CLR enabled to take effect, see clr enabled Option: