PublishAotCompressed 1.0.3
dotnet add package PublishAotCompressed --version 1.0.3
NuGet\Install-Package PublishAotCompressed -Version 1.0.3
<PackageReference Include="PublishAotCompressed" Version="1.0.3" />
paket add PublishAotCompressed --version 1.0.3
#r "nuget: PublishAotCompressed, 1.0.3"
// Install PublishAotCompressed as a Cake Addin #addin nuget:?package=PublishAotCompressed&version=1.0.3 // Install PublishAotCompressed as a Cake Tool #tool nuget:?package=PublishAotCompressed&version=1.0.3
PublishAotCompressed
This is a NuGet package with an MSBuild target to compress results of PublishAot with UPX. Simply add a reference to this package and publish with PublishAot
as usual. The result of AOT compilation will be compressed. UPX typically achieves 60% or more size savings. To achieve even more compression at the cost of startup time, specify <PublishLzmaCompressed>true</PublishLzmaCompressed>
property as well.
UPX will in-memory decompress the program at launch. This is typically not observable.
A Hello World style program with <UseSystemResourceKeys>true</UseSystemResourceKeys>
and <InvariantGlobalization>true</InvariantGlobalization>
(two documented size savings options that pretty much everyone should enable) compressed with UPX is around 830 kB in size, fully self-contained. (On Linux, don't forget to also set <StripSymbols>true</StripSymbols>
, the documented switch to place debugging symbols into a separate file.)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on PublishAotCompressed:
Repository | Stars |
---|---|
Sergio0694/ComputeSharp
A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
|
|
DataDog/dd-trace-dotnet
.NET Client Library for Datadog APM
|