相关疑难解决方法(0)

使用.Net 3.5程序集SQL 2005 CLR?

我有一个CLR存储过程,它引用在VS 2008中使用Linq创建的程序集.让我们称这个程序集为'MyLib'.

我似乎无法将"MyLib"放入我的SQL 2005数据库中.我做以下事情:

CREATE ASSEMBLY [MyLib]
    FROM 'C:\MyLib\bin\Release\MyLib.dll'
WITH PERMISSION_SET = UNSAFE
GO
Run Code Online (Sandbox Code Playgroud)

但我得到错误:

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.
Run Code Online (Sandbox Code Playgroud)

是否有更简单的方法将所有.Net 3.5程序集放入SQL 2005 CLR中,除了我为每个程序写出'CREATE ASSEMBLY'命令?这样做有一些"最佳实践"方式吗?

.net sql-server clr sqlclr

5
推荐指数
1
解决办法
5967
查看次数

标签 统计

.net ×1

clr ×1

sql-server ×1

sqlclr ×1