This guide is applicable to BizTalk Server 2016 with Feature Pack 3 Installed.
Version of WinSCPNet library is different once CU5/FP3 have been installed.
Original BizTalk Server 2016 installation requires 5.7.7.
More info here:
BizTalk Server 2016 Prerequisites:
The Messaging Engine failed to add a receive location “FileSync.SFTP” with URL “sftp://raclede.net/files/*.*” to the adapter “SFTP”. Reason: “System.IO.FileLoadException: Could not load file or assembly ‘WinSCPnet, Version=220.127.116.1165, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)
How to solve:
- Copy the both WinSCP exe and dll (5.13.1) to BizTalk Installation Path (Do not GAC the dll)
How to get the exe and dll
- Use Nuget in Visual Studio to get the specific version of WinSCP.
2. Once added, just browse to the lib for the dll and tools folder for the .exe