sshnet / SSH.NET

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.
http://sshnet.github.io/SSH.NET/
MIT License
4.03k stars 937 forks source link

Exception has been thrown by the target of an invocation. #1527

Open kocharR opened 1 month ago

kocharR commented 1 month ago

I have been puzzled by this error while using Renci SSH.NET for my SSIS project. It woks perfectly on machine where ssis is installed. Butwhen deploying to sqlserver machine, I see error "Exception has been thrown by the target of an invocation." Both machine have 4.6.2 farmework installed. Renci.SshNet.dll is added to the GAC filder as well. What am i misisng?

mus65 commented 1 month ago

Please provide the full stacktrace and some details about what your code is doing.

I would not recommend adding SSH.NET to the GAC or using the GAC at all. Even the documentation basically says to not use it:

You should share assemblies by installing them into the Global Assembly Cache only when you need to. As a general guideline, keep assembly dependencies private, and locate assemblies in the application directory unless sharing an assembly is explicitly required.