Thursday, February 1, 2018

How to include an external assembly---UiPath(RPA)


In order to include an external assembly (.dll) in UiPath, you have to take the following steps:
1. Create a new Class Library C#/VB project
2. Right click on References ->Add Reference
AddReference.png
3. Browse for the external dll and add it as a reference
BrowserReference.png
4. Do the same thing for System.Activities.Presentation, but search for it through to the list of already available assemblies
5. Create a class that implements IRegisterMetadata (from System.Activities.Presentation.Metadata namespace) to make your assembly visible to UiPath. This is not necesary if your assembly has activities. 
public class RegisterMetadata : IRegisterMetadata
{
    public void Register()
    {
    }
 }
6. You need to use at least one object from the external assembly to force loading it in UiPath
7. Build the project in Release
8. Follow this '

How to execute your custom code in a workflow'

 to learn how to create a custom package in which you have to include both the created and the referenced external assemblies.

3 comments: