Error "Cannot load assembly: C:\Users\[username]\.nuget\packages\uipath.sap.bapi.activities\2.2.2\lib/net461/UiPath.SAP.BAPI.dll" Thrown When Installing Package UiPath.SAP.BAPI.Activities In UiPath Studio

Error fix for "Cannot load assembly: C:\Users\[username]\.nuget\packages\uipath.sap.bapi.activities\2.2.2\lib/net461/UiPath.SAP.BAPI.dll" thrown when installing package UiPath.SAP.BAPI.Activities in UiPath Studio.

Symptom: When installing package UiPath.SAP.BAPI.Activities in UiPath Studio, below error message appears:

[ERROR] [UiPath.Studio.App.Logging.OutputLogger] [46] Cannot load assembly: C:\Users\andy\.nuget\packages\uipath.sap.bapi.activities\2.2.2\lib/net461/UiPath.SAP.BAPI.dll : System.IO.FileNotFoundException: Could not load file or assembly 'sapnco, Version=3.0.0.42, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. The system cannot find the file specified.

Root Cause: The package install prerequisites is not met. The 32bit (x86) .NET 4.0 Variant of the SAP Connector for Microsoft .NET 3.0 (NCo 3.0) is a prerequisite for this activity pack. This connector also requires the Microsoft C++ Runtime DLL version 10.0 (this is contained in the Microsoft Visual C++ 2010 Redistributable Package).

Resolution:

  1. Install SAP Connector for Microsoft .NET 3.0 and Microsoft C++ Runtime DLL version 10.0
  2. Install the package - UiPath.SAP.BAPI.Activities in UiPath Studio.