.NET Native AOT
Hacker ApprovedRanked 5 of 26 compilers by recommenders
People recommend .NET Native AOT for compiling C# into small, self-contained native executables that do not need the .NET runtime installed, with binaries comparable to Go. The common caveat is that reflection and some language features are restricted.
People recommend .NET Native AOT for compiling C# into small, self-contained native executables that do not need the .NET runtime installed, with binaries comparable to Go. The common caveat is that reflection and some language features are restricted.
39 people gave an opinion
- recommend it
- 26
- criticize it
- 13
- approval share
- 67%
Recommended in 10 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: not recommended
- March 2026: recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: recommended
- August 2026: not recommended
- September 2026: recommended
- October 2026: recommended
- November 2026: not recommended (month in progress)
Why it carries the badge
- 26 people recommend itNeeds 10 or more, met.
- 2 recommenders for every criticNeeds 2 to 1 or better, met.
- Recommended in 10 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Single-file binaries with no runtime needed
“produced a single-file static binary which is similar in size to what Go would produce”
Comment from 16 Jul 2026 in “G# – A modern .NET language with Go, Kotlin, and Swift ergonomics” “Applications can be compiled as a single file with no dependancies.”
Comment from 8 May 2026 in “Just Fucking Use Go” “C# no longer requires .NET installed or bundled inside exe.”
Comment from 2 Dec 2025 in “Anthropic acquires Bun” - Comment from 31 Mar 2026 in “Axios Compromised on NPM – Malicious Versions Drop Remote Access Trojan”
Binary size comparable to Go
“AOT .NET is an official first party distribution target that in my experience is on par with building a Go binary”
Comment from 10 Jun 2026 in “Port React Compiler to Rust” “You can already AOT compile .NET software to an executable to run on whichever platform you need, just like Go.”
Comment from 10 Apr 2026 in “Why I'm Building a Database Engine in C#” “produced a single-file static binary which is similar in size to what Go would produce”
Comment from 16 Jul 2026 in “G# – A modern .NET language with Go, Kotlin, and Swift ergonomics” - Comment from 2 Jan 2026 in “2026: The Year of Java in the Terminal”
- Comment from 31 Dec 2025 in “2026: The Year of Java in the Terminal”
Works reliably in production
“overall I'm very happy with using .NET with Native AOT”
Comment from 8 Jul 2026 in “Show HN: Fast, native Mac file manager (filters, fuzzy find, 9 MB, no Electron)” “It's been working fine for a few years now.”
Comment from 19 Jun 2026 in “Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28” “NativeAOT has worked wonderfully for us”
Comment from 21 Oct 2026 in “C# now beats Rust on WASM size” Better performance than before
“the real win is predictable performance”
Comment from 6 Mar 2026 in “Show HN: Moongate – Ultima Online server emulator in .NET 10 with Lua scripting” “It brings a lot of performance to .NET.”
Comment from 19 Sep 2026 in “Performance Improvements in .NET 11”
What people warn about
Each mark is one comment
Many gotchas in real apps
“Existing code bases can be a pain, though, especially applications that heavily rely on things like C++/CLI and COM Interop”
Comment from 10 Sep 2026 in “JEP 544: Ahead-of-Time Code Compilation” “We do AOT at work on a fairly large app and keep tripping over corners.”
Comment from 11 Dec 2025 in “COM Like a Bomb: Rust Outlook Add-in” “as soon you try aot you just meet a wall of compilation errors”
Comment from 16 Jul 2026 in “G# – A modern .NET language with Go, Kotlin, and Swift ergonomics” - Comment from 12 Nov 2025 in “.NET 10”
Reflection and features unsupported
“show-stopping restrictions like "you can't use reflection" and "you can't use native sessions"”
Comment from 13 Nov 2025 in “.NET 10” “That makes it confusing and fickle since not all language features work with AOT.”
Comment from 11 Sep 2026 in “Rust is tier-1 language at Microsoft” “For us the showstopper was you can't use reflection.”
Comment from 12 Nov 2025 in “.NET 10” - Comment from 11 Apr 2026 in “Why I'm Building a Database Engine in C#”
Immature with limited ecosystem support
“Last time I checked, NativeAOT was only for console apps, i.e. didn't support any GUI frameworks.”
Comment from 3 Nov 2025 on Hacker News “C# AOT is relatively nascent and not yet propagated through all of the ecosystem”
Comment from 29 Sep 2026 in “Rust for C# and .NET developers guide by Microsoft” “it's lack of maturity was explicitly cited by Anders as a gap”
Comment from 29 Sep 2026 in “Rust for C# and .NET developers guide by Microsoft” Quirky CPU matching and libc dependency
“it's still a bit quirky because of the way you need to match CPU to binary”
Comment from 17 Sep 2026 in “Performance Improvements in .NET 11” “That isn't truly self-contained. It still relies on libc.”
Comment from 8 May 2026 in “Just Fucking Use Go”
Other compilers people recommend
The four most recommended other compilers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Criticize | Approval | Months | Owned | Badge |
|---|---|---|---|---|---|---|
| GCC | 138 | 123 | 53% | 12 | 15 yrs9 owners | — |
| Clang | 74 | 50 | 60% | 12 | — | — |
| Free Pascal compiler | 38 | 7 | 84% | 11 | — | Approved |
| GraalVM Native Image | 31 | 9 | 78% | 11 | — | Approved |
| .NET Native AOTThis page | 26 | 13 | 67% | 10 | — | Approved |
What people said
40 of the 49 comments that mention it, newest first. Each links to the original comment.
“NativeAOT has worked wonderfully for us”
“it's lack of maturity was explicitly cited by Anders as a gap”
“Here is a .NET example of writing node.js extensions in C#, from Microsoft themselves.”
“C# AOT is relatively nascent and not yet propagated through all of the ecosystem”
“It brings a lot of performance to .NET.”
“it's still a bit quirky because of the way you need to match CPU to binary”
“That makes it confusing and fickle since not all language features work with AOT.”
“Native AOT with C#/.net has come a long way”
“Existing code bases can be a pain, though, especially applications that heavily rely on things like C++/CLI and COM Interop”
“Game developers that use C# adopt NativeAOT with zero friction, it's just a natural fit”
“as soon you try aot you just meet a wall of compilation errors”
“produced a single-file static binary which is similar in size to what Go would produce”
“overall I'm very happy with using .NET with Native AOT”
“It's been working fine for a few years now.”
“AOT .NET is an official first party distribution target that in my experience is on par with building a Go binary”
“Now you can get most of it via C# AOT or Swift, with much better ecosystem.”
“That isn't truly self-contained. It still relies on libc.”
“Applications can be compiled as a single file with no dependancies.”
“see OCaml, Delphi, D, or C# AOT”
“reflection is severely limited in .NET AOT vs. JIT”
“You can already AOT compile .NET software to an executable to run on whichever platform you need, just like Go.”
“it's fantastic for servers on Linux”
“you can use C# like go - you don't need to ship the CLR.”
“I've managed to bypass the managed heap and achieve sub-microsecond determinism.”
“the real win is predictable performance”
“it works perfectly with Go binaries or .NET’s AOT compiler”
“It produces binaries as small as go or rust.”
“CoreCLR NativeAOT is already shipping real games on Nintendo, PS5, and Xbox.”
“C# AOT may sometimes require fiddling around, but in my experience a lot less fiddling around than what my alternative used to be”
“it and the GC at least would still make its use difficult at best for some of C/C++'s remaining niches”
“We do AOT at work on a fairly large app and keep tripping over corners.”
“C# no longer requires .NET installed or bundled inside exe.”
“it is very exotic and undocumented path that is not guaranteed to be stable”
“You don't have to pay for dotnet AOT.”
“show-stopping restrictions like "you can't use reflection" and "you can't use native sessions"”
“NativeAOT and ReadyToRun remedies this problem by compiling ahead of time, but you trade space with time.”
“For us the showstopper was you can't use reflection.”
“There are quite a few gotchas for this, especially web apps.”
“They're self contained and native, but they're still massive.”
“Last time I checked, NativeAOT was only for console apps, i.e. didn't support any GUI frameworks.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.