+1 vote
by (160 points)
edited by

Hi,

I'm using rebex on SQL SSIS and all works fine on my pc but when I push it to the server it fails to find the dll. I've used gac to register the dlls and verified they are in the cag cache. This is the error i'm getting when trying to execute the ssis package any help would be appreciated;

Message Executed as user: SQLServerAgent. Microsoft (R) SQL Server
Execute Package Utility Version 10.50.4302.0 for 64-bit Copyright
(C) Microsoft Corporation 2010. All rights reserved. Started:
09:43:58 Error: 2015-04-30 09:43:58.72 Code: 0x00000001
Source: Script Task Description:
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.IO.FileNotFoundException:
Could not load file or assembly 'Rebex.Sftp, Version=3.0.5298.0,
Culture=neutral, PublicKeyToken=1c4638788972655d' or one of its
dependencies. The system cannot find the file specified. File name:
'Rebex.Sftp, Version=3.0.5298.0, Culture=neutral,
PublicKeyToken=1c4638788972655d' at
STcc37ba2b6d5341bcb884990d75e0b9b4.csproj.ScriptMain.Main() WRN:
Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog]. --- End of inner
exception stack trace --- at
System.RuntimeMethodHandle.
InvokeMethodFast(Object target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner) at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks) at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags
bindingFlags, Binder binder, Object target, Object[] providedArgs,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParams) at
Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
End Error DTExec: The package execution returned DTSER_FAILURE (1).
Started: 09:43:58 Finished: 09:43:58 Elapsed: 0.39 seconds. The
package execution failed. The step failed.

Applies to: Rebex SFTP

1 Answer

0 votes
by (58.9k points)
selected by
 
Best answer

Hello,

it looks like the Rebex SFTP dll version 5298 really could not be found in the server's Global Assembly Cache (GAC).

Please note that there are actually 2 GAC's - one for .NET 3.5/.NET 2.0 and another one for .NET 4.0. See more in this stackoverflow post.

So could you please make sure that you deployed the expected version 2014 R2 of all the requried Rebex dlls into the relevant server GAC? i.e. Rebex Common, Rebex Networking, Rebex SFTP dll's.

Let me know if the above helped.

by (160 points)
Thanks its past my skill level so i'll pass it to my colleagues to see if they can work it out as i'm not sure how to install in both gac's
by (144k points)
OK, please let us know whether you were able to solve this.
The following answer might also be helpful: http://forum.rebex.net/2439/how-do-install-the-component-into-global-assembly-cache-gac
by (160 points)
Finally got it working, we are currently using sql server 2008 r2 which doesn't seem to support .net 4 therefore when referencing rebex I can only use v2.0, which means I have to resister the dll in  the old gac in c:\windows\assembly. To do this on server 2012 I had to install the 3.5 .net sdk so that I could use the appropriate gacutil.

Hope that makes sense as I tried lots of different ways to install the dll against the old gac and nothing worked except the above.
by (18.0k points)
Thank you for sharing your solution - it makes sense.
Don't be afraid to use the .NET 2.0 distribution of Rebex components, they have to be equal to the .NET 4.0 ones except of some advanced features like asynchronous API.
asked Mar 9, 2016 by (120 points) Hi, I also encountered this problem.
by (120 points)
Hi I also encounter this problem right now. its really weird cause when i ran my previous binaries, i never encounter this error. but when i launch my current binaries i encounter this error. its really weird cause i never change anything in ssis. Hope you can help me
by (70.2k points)
...