# Missing DLL exception using SQlCipher in .NetCore application

**URL:** <https://discuss.zetetic.net/t/missing-dll-exception-using-sqlcipher-in-netcore-application/6041>\
**Category:** Issues\
**Created:** [August 16, 2023, 1:29am UTC](https://discuss.zetetic.net/t/missing-dll-exception-using-sqlcipher-in-netcore-application/6041 "2023-08-16T01:29:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuanBucz](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@JuanBucz](https://discuss.zetetic.net/u/JuanBucz)\
**Post date:** [August 16, 2023, 1:29am UTC](https://discuss.zetetic.net/t/missing-dll-exception-using-sqlcipher-in-netcore-application/6041/1 "2023-08-16T01:29:05Z")

</div>

We have a .NetCore application which uses SqlCipher for Sqlite encryption.  
The appication is installed and runs as a service on the client machine.  
We are running into issues using SqlCipher on some of our installations  
(more notably Windows 10 VM on Hyper-V - using Quick Install → Windows 10 MSIX Package)

**When attempting to start the service(application), we are seeing the following exceptions:**

**Exception Info:**  
The process was terminated due to an unhandled exception.  
System.DllNotFoundException. Dll was not found  
at SqlitePCL.Sqlite3Provider\_sqlcipher.SqlitePCK.ISQlite3Provider.sqlit3\_libversion\_number()

Once again, this issue does not happen on all our test installations, it mostly occurs on the  
Hyper-V VM noted above.

We were able to get around the runtime exception by including the following package in our build:

Inclusion of this package causes issues with encryption resulting in the Sqlite DB not getting encrypted.

**Here are the NuGet packages we are including:**  
PackageReference Include=“Microsoft.Data.Sqlite.Core” Version=“7.0.9”  
PackageReference Include=“SQLitePCLRaw.bundle\_zetetic” Version=“2.1.5”  
PackageReference Include=“zetetic-sqlcipher-windows-fips” Version=“4.5.3”

**I’ve attached a screenshot highlighting the error we see in the event viewer:**

 ![SqlCipherErrorScreenShot](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/2X/b/b177d93ff9b68dff83b05582ac3ceb9b1b3577c8.jpeg)

Can you please help us investigate this further as to why it is only failing in some environments?

Thanks,  
JohnB

---

<div class="post-metadata">

**Author:** ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)\
**Post date:** [August 16, 2023, 7:52pm UTC](https://discuss.zetetic.net/t/missing-dll-exception-using-sqlcipher-in-netcore-application/6041/2 "2023-08-16T19:52:23Z")

</div>

Hello @JuanBucz - thank you for getting in touch. We have received your private support request via email and have communicated back to you there via private channels since this is an Enterprise support request.
