Right now, I am trying to build a custom activity. The reason for this is that I need to use the PDFTron SDK. This relies on me using 2 .dll files as dependencies. Since these are not supported directly in UiPath, I have read I need to put them in a nuget package or custom activity.
While I did not have too much trouble building the custom activity, I have not been able to get my workflow to locate the dependent dlls. Right now, in my csproj file, I am specifying that they should be in "lib\net6.0-windows7.0". I have also tried placing them in "runtimes\win-x64-native" and had the same problem.
The project runs when I manually put the .dll files I need in the project folder, but how do I make them accessible at runtime as part of the nuget package for the custom activity.
Edit: I want to mention I have converted these files to zip, looked in the expected directory, and have confirmed that the .dll files have been copied to where I expect.
I included this in my csproj file, but it is still not solving my problem. I have tried so many variations of editing the csproj file but it always cannot locate PDFTronC.dll or one of its dependencies.
Edit: I have also confirmed when inspecting my nuget package file that these files are being put in lib\net6.0-windows7.0 but they cannot be located at runtime
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.