Developer knowledge network · moderated exchange

UnreliableCode 커뮤니티

개발자 연구, 리버스 엔지니어링 및 코딩 커뮤니티

Knowledge index살다
4Categories
919Threads
2.8K게시물
Guide

NativeAOT compilation: compiling C# to pure standalone x64 native binaries

dotnet_native_aot
C# Veteran
MEMBER
대표: 174
가입 날짜: Sep 2021
게시물: 16
감사해요: 62
1개월 전 · Jul 10, 2026 10:49 PM
#1

How to compile C# CLI tools and memory utilities directly to native machine code in .NET:

In .csproj:

XML
<PropertyGroup>
  <PublishAot>true</PublishAot>
  <OptimizationPreference>Speed</OptimizationPreference>
  <InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
dotnet publish -c Release -r win-x64

Output: A tiny 6.5MB standalone .exe with no .NET runtime or DLL dependencies that boots in 3 milliseconds!

ptr_arithmetic
C++ Wizard
MEMBER
대표: 162
가입 날짜: May 2018
게시물: 73
감사해요: 42
1개월 전 · Jul 11, 2026 12:54 AM
#2

3ms startup time is incredible for CLI offset dumpers and scanner utilities.

segfault_sam
Member
MEMBER
대표: 68
가입 날짜: Mar 2019
게시물: 22
감사해요: 57
1개월 전 · Jul 11, 2026 1:26 PM
#3

NativeAOT single file binaries are so convenient to distribute.