title: Azure Function App using SQLite M1 Macbook - Unable to load shared library 'e_sqlite3' or one of its dependencies
body: <p>Running MacOS Monterey version 12.1
  IDE Jetbrains Rider version 2021.3.2</p>
  <p>Using Microsoft EF Core version 6.0.1 on Macbook Pro M1. Trying to save to the database using EF Core but getting the following error message back.</p>
  <p>It's an Azure Functions App that I am running locally and attempting to connect locally.</p>
  <p>I've got Migrations working through EntityFramework but just cannot see to get the dbContext to connect to the DB when a function is called through the app.</p>
  <pre><code>'System.DllNotFoundException: Unable to load shared library 'e_sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libe_sqlite3, 0x0001): tried: 'libe_sqlite3' (no such file), '/usr/local/lib/libe_sqlite3' (no such file), '/usr/lib/libe_sqlite3' (no such file), '/Users/&lt;name&gt;/RiderProjects/API/project.API.Admin/bin/Debug/net6.0/libe_sqlite3' (no such file), '/usr/local/lib/libe_sqlite3' (no such file), '/usr/lib/libe_sqlite3' (no such file)'
  </code></pre>
  <p>I've tried installing 'SQLitePCLRaw.bundle_e_sqlite3 2.0.8-pre20220111224339' package but I still get the same problem.</p>
  <p>Here is my CSPROJ file</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
      &lt;PropertyGroup&gt;
          &lt;TargetFramework&gt;net6.0&lt;/TargetFramework&gt;
          &lt;AzureFunctionsVersion&gt;V4&lt;/AzureFunctionsVersion&gt;
          &lt;LangVersion&gt;preview&lt;/LangVersion&gt;
      &lt;/PropertyGroup&gt;
      &lt;ItemGroup&gt;
          &lt;PackageReference Include=&quot;Microsoft.Azure.Functions.Extensions&quot; Version=&quot;1.1.0&quot; /&gt;
          &lt;PackageReference Include=&quot;Microsoft.Azure.WebJobs.Extensions.OpenApi&quot; Version=&quot;1.0.0&quot; /&gt;
          &lt;PackageReference Include=&quot;Microsoft.NET.Sdk.Functions&quot; Version=&quot;4.0.1&quot; /&gt;
          &lt;PackageReference Include=&quot;Microsoft.Extensions.DependencyInjection&quot; Version=&quot;6.0.0&quot; /&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup&gt;
          &lt;None Update=&quot;host.json&quot;&gt;
              &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt;
          &lt;/None&gt;
          &lt;None Update=&quot;local.settings.json&quot;&gt;
              &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt;
              &lt;CopyToPublishDirectory&gt;Never&lt;/CopyToPublishDirectory&gt;
          &lt;/None&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup&gt;
        &lt;ProjectReference Include=&quot;..\iAi.Services\iAi.Services.csproj&quot; /&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  <p>Any help on how to get SQLite working on Mac using EntityFramework and .NET 6 is greatly appreciated.</p>