SQL Error - Could not load file or assembly 'System.Data.Linq'

0

I have an assembly which I am trying to run from SQL, but failing due to the following error, which I hope is something trivial.

Could not load file or assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. 
Assembly in host store has a different signature than assembly in GAC.
(Exception from HRESULT: 0x80131050)         
at MyAssembly.MyProcess.GenerateLevyForm(String s)
at MyAssembly.MyProcess.GenerateImage(SqlString s)

In the application where the assembly was writen, everything was done for Framework v4, which I understand to be "too up to date" for SQL, so have rolled back to v3.5. The application compiles okay.

From the application, I copy the assembly files to the SQL server (and the assemblies which it inherits):

  1. MyAssembly
  2. MyDatabaseAssembly
  3. System.Data.Linq (from Framwork v3.5) etc.,

Fire the stored procedure which calls the function of my assembly and I get the error....

From what I can see in the GAC (Start > Run > "Assembly") it would appear that the only entry for System.Data.Linq is for version 3.5.0.0

Can anyone help?

Because I cannot seem to find any answer for this, I have had to review the code for an alternative approach and being that the System.Data.Linq was required to access the database (from which it was being called), I have removed the query and am now passing the data to the assembly from SQL; negating the need for System.Data.Linq ... and the assembly deploys/works now

sql
.net-assembly
gac
asked on Stack Overflow Dec 16, 2013 by Sean • edited Dec 16, 2013 by Sean

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0