BizTalk – SFTP Adapter – Missing WinSCPNet Library

Note:

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:

https://docs.microsoft.com/en-us/biztalk/install-and-config-guides/hardware-and-software-requirements-for-biztalk-server-2016

CU5/FP3 Info:

https://support.microsoft.com/en-us/help/4087345/sftp-adapter-improvements-for-biztalk-server

Error:

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=1.5.4.8265, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)

How to solve:

  1. Copy the both WinSCP exe and dll (5.13.1) to BizTalk Installation Path (Do not GAC the dll)
    1. WinSCP.exe
    2. WinSCPnet.dll

How to get the exe and dll

  1. Use Nuget in Visual Studio to get the specific version of WinSCP.

Nuget-WinSCP    2.  Once added, just browse to the lib for the dll and tools folder for the .exe

Nuget-WinSCP-InstallPath

 

 

BizTalk 2016 – Installing SAP Adapter- Microsoft.Adapters.SAP.SAPGInvoker.dll

After installing BizTalk adapter pack you would expect that enabling the SAP receive location port will just work. Guess what? Error!

Could not load file or assembly ‘Microsoft.Adapters.SAP.SAPGInvoker.dll’ or one of its dependencies. The specified module could not be found.
File name: ‘Microsoft.Adapters.SAP.SAPGInvoker.dll’

To solve this error you’ll need to install the SAP Libraries. Since i have a copy of previous SAP libraries, I’ve just reinstalled those, otherwise you’ll have to download it from SAP Market Place (you’ll need someone from your company that has access to those).

Steps:

  1. Install SAP NCO Libraries:
    1. NCo3018_Net40_x64.msi
    2. NCo3018_Net20_x86.msi
  2. Copy the SAP 3.0 libraries both x86 = 32bit, x64 = 64bit on the correct folder
    1. icudt26l.dll
    2. icuin26.dll
    3. icuuc26.dll
    4. librfc32u.dll
    5. libsapu16vc71.dll
    6. libsapucum.dll

32bit folder = C:\Windows\SysWOW64

64bit folder = C:\Windows\System32

3.  Restart the host instance