Issue with ScriptPack and System.Data.SQLite and LoadExtension

11 views
Skip to first unread message

Donny V

unread,
Mar 29, 2017, 12:02:11 AM3/29/17
to scriptcs
I created a ScriptPack which references System.Data.SQLite. This part works great.
I have a dynamic link extension I'm trying to load into SQLite using LoadExtension("mod_spatialite"). 
The way this works is that "mod_spatialite.dll" and its supported files just need to live in the same folder as System.Data.SQLite for it to load correctly.
Which I have successfully tested separately in a console app. 

Right now my folder structure looks like this.

root
-- scriptcs_bin
-- test.csx

Inside "scriptcs_bin" folder I have the compiled ScriptPack with all the dll's and supporting files for "mod_spatialite".
When I run test.csx it complains that the extension can't be found. But if I copy mod_spatialite.dll and its supported files to the root.
It runs fine. 

To me this seems like a path issue but not sure where ScriptCS is actually running the script. I tried adding "scriptcs_bin\mod_spatialite"
to LoadExtension() but it still didn't find it.

Can anyone maybe point me in the right direction?
Thanks!

references
--------------------------------------------

Donny V

unread,
Mar 31, 2017, 2:14:37 PM3/31/17
to scriptcs
Just to be clear root is a folder.
So something like this.
root => c:\gis
Reply all
Reply to author
Forward
0 new messages