I have a CLR stored procedure that references an assembly created in VS 2008 that uses Linq. Lets call this assembly 'MyLib'.
I can't seem to get 'MyLib' into my SQL 2005 database. I do the following:
CREATE ASSEMBLY [MyLib]
FROM 'C:\MyLib\bin\Release\MyLib.dll'
WITH PERMISSION_SET = UNSAFE
GO
But I get the error:
Assembly 'MyLib' references assembly 'system.core, version=3.5.0.0,
culture=neutral, publickeytoken=b77a5c561934e089.', 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(error not found)). Please
load the referenced assembly into the current database and retry your request.
Is there an easier way to get all of the .Net 3.5 assemblies into the SQL 2005 CLR, other than me writing out a 'CREATE ASSEMBLY' command for each one? Is there some "best practice" way of doing this?