For the purpose of backward compatibility with some older applications, I have a Windows 7 environment that is used to maintain and support these applications.
We call WinSCPnet from within a SQL Server Integration Services package, created with SQL Server Data Tools 2010, for deployment on a SQL Server 2012 Server.
We have a new requirement that involves cycling through a list of files that are spread across multiple sub-folders, and upload them to the same folder structure on a SFTP server. As a result, I have downloaded a newer version of the WinSCP automation package (version 5.17.10), which includes the WinSCP executable and the WinSCPnet DLL. This will allow us to take advantage of the additional functionality offered by the
class. This class is referenced in another C# code sample on this site that happens to meets our new requirements.
Previously, we had been using a version of WinSCPnet.dll (Product Version 5.7.7 per the file info), which I had been able to successfully register to the Global Assembly Cache using the PowerShell script below, copied elsewhere from this site:
Add-Type -AssemblyName "System.EnterpriseServices"
$publish = New-Object System.EnterpriseServices.Internal.Publish
Write-Host "Press any key to continue ..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Having uninstalled the previously installed version of WinSCPnet from the Global Assembly Cache, Attempts to run the above PowerShell script to install the new WinSCPnet version fail.
The script does not return any errors, but WinSCPnet does not show up in the Global Assembly Cache, and the existing script does not work as a result.
I can copy the old version back into the same folder and re-run the script, and that installs the old version back, but not the new version.
I have installed .NET Framework 4.0.30319.01 on the Windows 7 machine, but unsure if I need a later Windows 7 friendly version.
I have also tried to copy in turn the WinSCPnet.dll versions from the net40 and netstandard2.0 folder of the installation files into the same folder as the WinSCP Executable and script, but still no luck.
Any assistance you can give would be appreciated.
Thanks in advance.