Using external dll library in a project


#1

Christian Jensen
May 17, 2016 17:15 ANSWERED
Is it possible to import an external dll library to use in a UIPath project? If so, how do you do it?


Twilio SMS Error - Method not found: 'Void RestSharp.RestClient.set_BaseUrl
#2

Andrzej.Kniola May 17, 2016 17:18 Official comment
You need to create a nupkg and import it:


#3

Hello,

I followed both your tutorials to create and import custom .net packages into UIPath, but I cannot make it work.

Scenario:

Simple project compiled in release, having a method called “Greet” for testing purposes, and implementing the “Register” method from IRegisterMetadata as requested.

Created nuget package through Nuget package explorer successfully (Id called “ExternalAssemblyActivities”).

Added package to default folder, when opening UIPath, it detects the assembly to be installed. I do so and it does not seem to get any error:

The problem is that, I don’t know how to reference my recently added assembly, both via components in the Activities Panel (cannot find any element related to my added component) or through any kind of code statement inside the already existing controls. The tutorials don’t bring any further information.

Could you help me out, please? thanks in advance.


#4

I would suggest to import the Custom namaspace [ex: UiPath_External_Dll in your example should be ExternalAssembly] Without this import, the extended method or activities could not be visible inside UiPath.


#5

If you want a custom activity you need to implement CodeActivity and override the Execute Method


#6

Got it working!
Probably because I am using the Community Edition and don’t have a UiPath Folder under either of the Program Files folders, to get my external DLL to show as an Activity in UiPath Studio, I needed to save the Package to my “C:\Users\%user%\AppData\Local\UiPath\app-%UiPathId%\Packages” folder.

Thanks to Andrew.James for providing the final piece of the puzzle re the Execute method override.