Hi everyone,
Hope you all are doing well. I’m new to RPA
I’m using UiPath community version(not legacy) and dotnet 6.0
I’m trying to create a CustomActivity to perform Sqlite Database operations. My Class Library is using nuget package System.Data.Sqlite , I’ve created the package successfully, also tested it with a simple c# console project(which is working fine)
when I add my package to UiPath and try to run the activity, it is throwing error as below
My Solution Explorer is like this
I was also getting error previously ‘Could not load file or assembly System.Data.Sqlite’ , so I added System.Data.Sqlite.dll as well in the nuget package as below
Kindly correct me if I’m doing anything wrong
Thanks in advance.
Thanks @Anil_G ,
Actually I used the old method i.e., creating class library c# project, and make package using Nuget Package Explorer
I followed this link to create package.
Also, If a do not use System.Data.Sqlite in my custom activity then everything goes fine.
Thank @Jon_Smith ,
yes I first tried to use built-in activities but found hard to make it dynamic as I wanted to only pass the connection string to dynamically connect to my Sqlite Database
Therefore I preferred to create Custom Activity
Also my custom activity works fine when I do not include any third party nuget package in it.
Thanks @Jacqui_M,
I wish it would be , but it’s not the issue, I tried with passing the right connection string.
Also in case of wrong connection string, SQLite throws proper relevant exception (I tried that too)
I found the problem,
Actually my Custom Activity project was building on x64 bit target platform, but the third-party sqlite library which I was using was for 32bit applications
This was the main issue, so I first download a 64bit System.Data.Sqlite.dll file(you can find it easily from dllme)
Then I created a nuget Package for that 64bit dll, and add it into my project as well as in UiPath dependencies
So that I don’t have to include System.Data.Sqlite in my own package.
Now it’s working fine
Thanks to @all .