In this post I describe an issue I ran into at work when we were trying to test an app using Microsoft.Data.SQLite on Alpine Linux, and were running into this error: Unhandled exception. System.DllNotFoundException: Unable to load shared library 'e_sqlite3' or one of its dependencies. This post is primarily a walkthrough of the steps I took to solve the issue. I describe the problem itself, the environment in which it happened, the things we tried to isolate the issue, the eventual root cause, and how we resolved it. We ran into the issue while working on the Datadog .NET tracer in a branch where we were adding provisional support for .NET 10. One of the issues we ran into in this branch was that .NET 10 no longer runs on the version of alpine we were previously using, alpine:3.14. One of the issues we have to deal with in general is that we support a wide range of target frameworks and deployment platforms, which generally means we need to use and test on "old" versions of both distros and target frameworks. Initial attempts to run .NET 10 on alpine:3.14 fails at runtime with the following error: Failed to load /usr/share/dotnet/host/fxr/10.0.0-preview.5.25277.114/libhostfxr.so, error: Error relocating /usr/share/dotnet/host/fxr/10.0.0-preview.5.25277.114/libhostfxr.so: _ZSt28__throw_bad_array_new_lengthv: symbol not found The library libhostfxr.so was found, but loading it from /usr/share/dotnet/host/fxr/10.0.0-preview.5.25277.114/libhostfxr.so failed We subsequently confirmed that this is expected: .NET 10 has updated its support matrix, and now requires Alpine 3.17 or higher. After jumping through the various hoops to confirm that we could update the base image of alpine without breaking anything, we updated our build and test images to use alpine:3.17. And that's when we started hitting the issue that is the focus of this post. As part of CI tests, we run over a hundred different sample applications, across a variety of different package version combinations an...
First seen: 2025-08-29 16:36
Last seen: 2025-08-29 23:37