2013-05-22 62 views
1

我使用SQL Server 2012,我想創建CLR我如何在SQL Server中創建版本5 mscorlib.dll程序集參考2012

我想在SQL Server中執行此命令2012

CREATE ASSEMBLY AndishCSSCommon FROM 'C:\Andish.CSS.Common.dll' 
    WITH PERMISSION_SET=EXTERNAL_ACCESS 

但我得到這個錯誤

Msg 10301, Level 16, State 1, Line 1 
Assembly 'Andish.CSS.Common' references assembly 'mscorlib, version=5.0.5.0, 
culture=neutral, publickeytoken=7cec85d7bea7798e.', 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(The system cannot find the file specified.)). Please load the 
referenced  assembly into the current database and retry your request. 

,並在我的debug文件夾中不存在的mscorlib.dll

怎麼能我CREATE ASSEMBLYmscorlib.dll之前CREATE ASSEMBLY AndishCSSCommon FROM 'C:\Andish.CSS.Common.dll'

+1

標準框架中沒有5.0.5.0版本的mscorlib。一些Google搜索表明Silverlight中可能有一個 - 所以這聽起來像你可能試圖使用依賴於Silverlight的程序集。 –

回答

0

你可以嘗試將目標框架設置爲從項目的

屬性更近的一個 - >應用程序 - >目標框架。

+0

謝謝。但那不起作用 –

+0

這不起作用。 – thestar

相關問題