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 folder of WinSCP.

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

Nuget-WinSCP-InstallPath

 

 

Advertisements

SSIS 2012 to SSIS 2016 Migration – Arithmetic operation resulted in an overflow

We’ve recently upgraded our SSIS 2012 to SSIS 2016, during the package upgrade it goes without issue. In Visual Studio, there’s no problem running it, however when we use the SSIS runtime we’ve encountered the following error:

“Arithmetic operation resulted in an overflow.”. Possible failure reasons: Problems with the query, “ResultSet” property not set correctly, parameters not set correctly, or connection not established correctly.

The Execute method on the task returned error code 0x80131516 (Arithmetic operation resulted in an overflow.). The Execute method must succeed, and indicate the result using an “out” parameter.

To solve this issue,  I’ve recreated the SQL Task and viola no error!.

 

 

Visual Studio 2012 – Install Shield LE Basic Tutorial

Starting Visual Studio 2012, the Setup project for Visual Studio is not supported anymore and the only free alternative is to use the Install Shield Limited Edition (LE).

In this post, I will describes the steps to successfully:

A. Deploy a project to GAC (Global Assembly Cache)

B  Generate/pacakage Single MSI for installation

 

Steps:

1. Start by downloading the Install Shield here. And installing it.

2. Next is to create a new install shield limited edition project.

3. Follow the wizard, and in the step 2, right click the destination computer and select [GlobalAssemblyCache]

4. Drag and drop the Primary output from the Solution (top pane).

5. Go to every item in the [GlobalAssemblyCache], right click Dependencies from scan at build. Be sure to unselect other reference assemblies so it will not be registered in GAC.

Single MSI Generation:

6. Now to create a single MSI setup, Go to step 6 (Releases), Select the Single Image. In the build tab, Set compression = compressed, and on the Setup.exe tab set the Setup Launcher to No.

7. Right click the Solution, then select Configuration Manager, in the InstallShield project set the configuration to Single Image. Then Right click Install Shield project – > Build.

8. Go to Install Shield Project – > Express – > Single Image – > DiskImages -> Disk1. Viola. the MSI can be found there.