我有一个c#类库,由SQL存储过程(CLR)调用。类库执行一些计算并将表返回给SQL。
我之前已经向SQL添加了程序集,但是当我添加类库时。我收到以下错误
'MyExporter' references assembly 'microsoft.csharp, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', 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.
我做了一些研究,发现SQL不支持Microsoft.charp库。我需要在类库中删除对microsoft.charp的任何引用。我现在已经从我的类库中的参考部分删除了microsoft.charp,我使用的是动态关键字。我现在已改为对象。
目前,我在C#库中收到错误,如下所示
Severity Code Description Project File Line Suppression State
Error CS0656 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' Optimal.SynTI.Exporter D:\Workspace\SynTQV5 Projects\MyExporter\DataCollater.cs 731 Active
我理解这一行代码不会给你任何见解,但这就是c#错误所在
// Select the first item as the sheet ID.
// Get the Sheet Id from the array.
iNVls.SheetID = item.FinalData[0].Value;
我也在我的类库中使用Linq,我是否也必须删除对linq的任何引用?
谢谢