1 か月前 · Jul 10, 2026 10:49 PM
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-x64Output: A tiny 6.5MB standalone .exe with no .NET runtime or DLL dependencies that boots in 3 milliseconds!