BizTalk Server and WinSCP Error: Could not load file or assembly ‘WinSCPnet, Version=1.16.0.16453, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ or one of its dependencies.

  • Sandro Pereira
  • Jan 27, 2026
  • 3 min read

It is always fun to return to one of my favorite topics: Errors and warnings, causes and solutions – aka Troubleshooting! Regardless of the technology, language, or service we are using. In this case, the problem occurred again when configuring the SFTP adapter in BizTalk Server 2020!

Everything was running fine until it wasn’t! And I suddenly start getting this error:

System.IO.FileLoadException: Could not load file or assembly ‘WinSCPnet, Version=1.16.0.16453, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ or one of its dependencies. General Exception (Exception from HRESULT: 0x80131500)
File name: ‘WinSCPnet, Version=1.16.0.16453, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf’ —> System.Exception: SFTP adapter requires WinSCP to be installed. Please refer http://go.microsoft.com/fwlink/?LinkID=730458&clcid=0x409 . —> System.IO.FileNotFoundException: Could not load file or assembly ‘file:///C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.BizTalk.Adapter.Sftp\v4.0_3.0.1.0__31bf3856ad364e35\WinSCPnet.dll’ or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

Configuring SFTP support in BizTalk Server requires WinSCP, but determining which WinSCP version to install has historically been more complicated than it should be. The correct version depends not only on whether you are running BizTalk Server 2016 or 2020, but also on the Cumulative Update (CU) and Feature Pack / Feature Update level installed.

Cause

The issue start happen because we were running BizTalk Server 2020 with CU5, and someone updated the environment and installed BizTalk Server 2020 with CU6.

Once again, depending on the BizTalk Server version and the cumulative updates we have installed, we have to select the proper WinSCP version, for example:

  • With BizTalk Server 2020 (no CU installed), we need to use WinSCP 5.15.4
  • With BizTalk Server 2020 with CU1 and/or CU2 we need to use WinSCP 5.17.6
  • With BizTalk Server 2020 with CU3 and/or CU4 we need to use WinSCP 5.19.2
  • With BizTalk Server 2020 with CU5, we need to use WinSCP 6.1.2
  • With BizTalk Server 2020 with CU6, we need to use WinSCP 6.3.5

Solution

To resolve the SFTP Adapter issue, we need to copy WinSCP.exe and WinSCPnet.dll to the BizTalk installation folder, typically C:\Program Files (x86)\Microsoft BizTalk Server. To do that we need to:

  • Download the WinSCP 6.3.5
  • And copy the WinSCP.exe and WinSCPnet.dll to the BizTalk installation folder, normally C:\Program Files (x86)\Microsoft BizTalk Server.

Or download and execute this PowerShell script to automatically install the correct version: https://github.com/BizTalkCommunity/BizTalkWinSCPInstaller

Hope you find this helpful! So, if you liked the content or found it helpful and want to help me write more content, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top