Making Custom Activities with Dependent Dll files

I solved this problem by using an Invoke Code activity. Before the core logic begins, I check if the PDFTronC.dll file is in the working directory. If it is not, I copy the file over from the Y Drive to the working directory. Upon completion or failure of the process I then delete this file to be safe.

A janky solution to meet the jankiness of UiPath.

string sourcePath = @"Y:\myFolderDirectory\PDFNetC.dll";

string destinationPath = Path.Combine(Environment.CurrentDirectory, "PDFNetC.dll");

if (!File.Exists(destinationPath))
{
    File.Copy(sourcePath, destinationPath);
}
1 Like