ericsink / SQLitePCL.raw

A Portable Class Library (PCL) for low-level (raw) access to SQLite
Apache License 2.0
533 stars 109 forks source link

Library e_sqlcipher not found (Visio, VSTO) #345

Open Decugan opened 4 years ago

Decugan commented 4 years ago

I have a Visio VSTO Addin project and am attempting to change to an encrypted database. The change went without a hitch in a sister project that prepares Visio files for the Addin. So, I have listed important information in a text file to paste here. Thanks in advance for any insight that may be given. post-on-forum.txt

ericsink commented 4 years ago

After years of answering people's questions about SQLitePCLRaw, I believe you are the first to mention Visio. :-)

Okay, first of all, let's make a list of things that are working against you.

You're apparently on .NET Framework instead of .NET Core. In terms of finding the runtime DLL, that's always trickier.

Your project is an Addin, so I have no idea what the enclosing environment is doing, how things are layed out, what the path is, etc.

You're using packages.config, which often makes everything harder.

You're using e_sqlcipher, which I described as unsupported. By promising nothing, I can sometimes exceed that promise.

That about sums it up.

Despite all that, I figure this would work if you could figure out the path. You probably just need to look at the installed addin and see where the DLL landed, write some code to determine that path at runtime, and use it to initialize SQLitePCLRaw (which is the part I can help with).

anisagables commented 2 years ago

In VSTO addins, the SQLitePCLRaw.core.DLL is copied into a shadow copy folder similar to C:\Users\\AppData\Local\assembly\dl3\QC71XWQ3.0RZ\X4CTR4ZE.RTB\79d42926\00d2f265_30cbd701 but the e_sqlcipher is not. How can SQLitePCLRaw be initialized to look for e_sqlcipher from a different directly instead of the current directory?