I have started to use WinSCP .NET assembly within my apps to enable SFTP transfers. All is well and the code works very well.
My issue comes from deployment.
Firstly, I installed WinSCP via NuGet package manager (version 5.7).
As stated, the code I have works great, connects to my SFTP server fine, transfers, renames and deletes files great.
But....
When I publish the application I get the following error message:
Unable to install or run the application. The application requires that assembly WinSCP Version 1.0.6.3261 be installed in the Global Assembly Cache (GAC) first.
Funny thing is, that the version of WinSCPnet.dll
installed from NuGet is 1.2.6.5125.
I am using VS 2013 Ultimate, and using the built in publishing wizard.
Looking around the net, I found articles saying that WinSCPnet.dll
needs to be in the GAC, so my first action was to manually add the installed version of WinSCPnet.dll
(version 1.2.6.5125) into the GAC on the destination machine using gacutil /I winscpnet.dll
, which did succeed as it is visible in the Windows\assembly
folder, but the same error message appears on the destination machine after trying to reinstall the application.
It is a shame, as unless I can get this sorted, I will have to stop using this product and try something else.