I am getting a Target of an Invocation error post deployment which I believe is due to SSIS not using the library from the GAC so have I configured it incorrectly. I was able to install into the GAC on my machine as per instructions gacutil /i "C:\Program Files (x86)\WinSCP\WinSCPNet.dll" and the server computer I believe it is in the GAC, so is it not suppose to pick up the latest version. On my computer I tried copy local = false and both locations as in C:\Program Files (x86)\WinSCP  and where the gac installed it in C:\Windows\Microsoft.NET\assembly\GAC_MSIL\WinSCPnet , I then upgraded my version to the latest 5.21.2 and repeated both ways of referencing which I believe is referencing by path still as the library does not appear in the .NET references so I have no choice. Even if the version on the server is the same version or not it should still work as in find the latest version if I have copy local = False or is there more to it.
I know the library works as in I took out the code into a console app referenced by path using  and it worked so then it must be I am not referencing the GAC version correctly. I was also able to produce the same error when running it locally at first up until the point I placed it in the GAC on my local machine as in it would never reach the first line of code if I placed a break point and it would thru the same error "Target of an Invocation" so then this means I must have configured it correctly or not!
Maybe there is some truth to https://learn.microsoft.com/en-us/sql/integration-services/extending-packages-scripting/referencing-other-assemblies-in-scripting-solutions as my SSIS version is old "Microsoft SQL Server Integration Services Designer, Version 11.0.2100.60"
If you can please advise, thank you.