我已经编写了一个 CLR 存储过程,直到今天我引入了一个新的 dll 并且我正在尝试将一些第三方库注册到 SqlServer 2008 R2 但是当我运行以下命令时,一切都很好:
CREATE ASSEMBLY [DevExpress.Data] FROM 'C:\MyProject\DevExpress.Data.v12.2.dll' WITH PERMISSION_SET = UNSAFE
SqlServer 向我抛出一个错误:
Assembly 'DevExpress.Data.v12.2' references assembly 'windowsbase, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35.', 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(failed to retrieve text for this error. Reason: 15105)). Please load the referenced assembly into the current database and retry your request.
除 v4.0 外,c:\Windows\Microsoft.Net 上没有 3.0 版本,所以当我运行时
CREATE ASSEMBLY [WindowsBase] FROM 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\WindowsBase.dll' WITH PERMISSION_SET = UNSAFE
SqlServer 向我抛出另一个错误:
CREATE ASSEMBLY for assembly 'WindowsBase' failed because the assembly is built for an unsupported version of the Common Language Runtime.
看起来有一个 v3.0 的 windowsbase,但我能找到的唯一一个是 v4.0。
任何人都可以帮助我!?
提前致谢
马可