Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Discussion System.DllNotFoundException: Unable to load DLL 'sqlite3'

Discussion in 'Windows' started by Arunraj, Jan 4, 2023.

  1. Arunraj


    Jul 4, 2012
    Our application environment
    Uwp, hololens2, arm architucture
    I have a scenario, where I am using sqlite3 for my local DB. In the recent update of SQLite, we have only dll for x86 & x64. Uwp-arm support is not found. Instead, it had arm64-v8a & armeabi-v7a. While using that .so files inside unity and have changed the import settings below upload_2023-1-4_19-26-44.png

    after this when i tried to build for Hololens2, i was not able to do any operation DB. it shows exceptions as

    System.DllNotFoundException: Unable to load DLL 'sqlite3': The specified module could not be found.
    at Trimble.SQLite.NativeMethods.sqlite3_open_v2 (System.Byte[] filename, System.IntPtr& db, System.Int32 flags, System.IntPtr zvfs) [0x00000] in <00000000000000000000000000000000>:0

    And have tried the approach of using the target include

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" xmlns="">

    <DisableTrimleSql3Deploy Condition="'$(DisableTrimleSql3Deploy)' == ''">true</DisableTrimleSql3Deploy>

    <Target Name="CopySqlite3Binaries" BeforeTargets="AfterBuild">
    <arm Include="$(MSBuildThisFileDirectory)libs\WSA\arm\" />

    <Message Text="Copying sqlite3 binaries to output folder" />
    <Copy SourceFiles="@(arm)" DestinationFolder="$(TargetDir)ARM\" SkipUnchangedFiles="true" />

    after this, I couldn't proceed further. any help would be appreciated. thanks
  2. Tautvydas-Zilys


    Unity Technologies

    Jul 25, 2013
    You cannot run .so files on Windows. Those are probably meant for Android. Your only option is to recompile sqlite3.dll for UWP from source code yourself.
    Arunraj likes this.