Fixing an Old .net Core Native Library Loading Issue on Alpine
Key topics
The eternal struggle of dealing with native dependencies in .NET Core is on full display as developers dissect a tricky issue with loading native libraries on Alpine. Some commenters, like ZeroConcerns, lament the persistence of native dependencies, particularly with SQLite, and explore alternatives like Microsoft.Data.Sqlite. A lively debate ensues about the merits of switching to .NET Core, with some, like stackskipton, arguing it's only worth it if you need to run on Linux, while others, like pjmlp, point out that someone has to foot the bill for the upgrade. Meanwhile, josteink pokes fun at the irony of testing with the latest Alpine while using outdated .NET versions.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
2d
Peak period
18
48-60h
Avg / period
7.8
Based on 31 loaded comments
Key moments
- 01Story posted
Aug 27, 2025 at 6:59 AM EDT
4 months ago
Step 01 - 02First comment
Aug 29, 2025 at 12:32 PM EDT
2d after posting
Step 02 - 03Peak activity
18 comments in 48-60h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 1, 2025 at 4:27 AM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Replacing System.Data.SQLite with Microsoft.Data.Sqlite already helped with Apple ARM builds (despite all the small differences that only showed up in actual use), but pretty much the only native debugging I do these days is related to the "batteries" -- the linked article outlines the general strategy pretty well.
On the one hand, I feel bad about turning into a "pure-Java only" kind of developer (I mean, limiting yourself to H2, the horror...), but on the other hand, I'm increasingly starting to see their point. Oh, well, if AI actually works, I'm sure Microsoft.Native.Data.Sqlite is just around the corner (and, later edit, to prevent confusion: the abuse of 'Native' here is mostly making fun of Microsoft naming conventions -- they'd call it 'Interop' if it were like truly native).
Same applies to the pain of using native dependencies in Perl, Python, Ruby,...
Many .NET developers are only now slowly the pain of having so many dependencies to C++ DLLs, COM and C++/CLI.
One of the reasons why we still do so many .NET Framework projects at my employer agency.
What's the issue with porting them to .net (core)? Most of that stuff is still supported, if you only have native windows DLLs you would still be constrained to windows only, but still better than staying on ancient .net framework.
Yes, there is other nice language features but obviously 15 years of Framework code base has probably put up guard rails around those sharp edges.
My point still stands, I can't imagine most companies green lighting .Net Framework -> Core conversion if they can't switch to Linux. If you are stuck on Windows, you have probably developed all the tooling to deal with Windows so it's all sunk costs.
Getting access to things like Kestrel (breaking out of IIS jail) is way more critical. Also, self contained deployments mean you can stop shipping magical blessed machine images around. It's not even about the performance. It's about having technology that doesn't actively hate you.
Also they aren't the only ones, same applies on the Apple ecosystem, only those around Mac OS and OS X early days actually manage to find sensible documentation.
There are so many features that .Net 5+ brings to the table. Even if features aren’t important the performance improvements you get with the newer versions should be enough to justify moving to it.
I agree the support side is annoying but honestly the support side is really just “security” fixes with security being a very hard thing to describe here and gives MS a lot of wiggle room to not actually support it.
It would be interesting though, if it's possible to run webassembly inside the CLR (dotnet runtime).
But I don't really get the issue with native code inside a dotnet application. In the end everything you do in dotnet ends up being executed as native code. Even a simple console.writeline() is implemented in native code.
And yes, of course everything ultimately runs as native code, but deployment is a major issue. As long as you only deploy IL (or, possibly at some point, WASM), you only need to worry about the relatively lightweight CLR (the dotnet executable and its direct dependencies) -- it does get a lot more complex once you go beyond that, unfortunately.
On the flip side, good debugging!
Running in an unsupported dotnet version also means that there won't be any security patches. Not great.
> Running in an unsupported dotnet version is not great
Uh, dotnet 10 is currently versioned "10.0.0-preview.7". It won't be released until November 2025. It's therefor 1) Not guaranteed smooth and 2) unsupported. Source: https://dotnet.microsoft.com/en-us/download/dotnet/10.0
Perhaps you mean .NET 9.
Yes, it's a smooth update in many scenarios.
Edit: Microsoft officially supports .net release candidates for production use, the first RC is probably going to be released within the next few weeks.
That's literally what I said, yes. The track record is very punctual so far, so "in the first half of November" is highly likely.
> the first RC is probably going to be released within the next few weeks
I made a statement about the way that things factually are at present. No less, no more. You characterised .NET 10 as a supported version, and this is not currently true.
> Now is the time to upgrade to 10, do some testing and then deploy once 10 is released.
Really "Now" ? or "probably within the next few weeks" when there's a version that is somewhat supported?
My employer is not in the habit of deploying 2 months after the work is done. Nor are they in the habit of prioritising this pre-release over other more important work. They love .NET LTS releases when they are releases, but absolutely will not put a pre-release on production, no matter if it's "supported" in some sense.
LTSs are for people or companies with low appetite for this kind of risk, or who have contractual obligations to not be running unsupported or pre-release software. Preview 7 is by definition not release quality yet, as it's not the release.
I expect .NET 10 to get picked up by my employer in the new year. This is based on my experience with the update to .NET 8
Your way does seem to better in that you have capacity to trial pre-releases, but the long release cycle sounds sucky.
It requires clearance from management to spend actual money, measured in the amount of hours of work of everyone involved doing this times the hourly rate, to update every single configuration file, CI/CD build scripts, do a QA round on staging environment to validate everything is working as it was already before, to finally to production delivery, and tell everyone the new version is now greenlight for development.
Naturally having a security assessment that an upgrade is required is a good way to have that budget come to fruition.
It’s a hard sell to a client that they should use their budget for an upgrade to the core of their software without any visible feature additions. Hence they tend to live on in this limbo state.
Beneficial for consultants however.
This is the heart of the problem with outsourcing that the powers that be rarely recognize. Yes they might pay less by offshoring the initial development costs (CAPEX), but the long terms support and maintenance costs (OPEX) is then way more costly. It also gets harder and harder to find developers that want to work in this aging tech.