Cilica.OptimizerTask
0.20.8-preview
dotnet add package Cilica.OptimizerTask --version 0.20.8-preview
NuGet\Install-Package Cilica.OptimizerTask -Version 0.20.8-preview
<PackageReference Include="Cilica.OptimizerTask" Version="0.20.8-preview"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Cilica.OptimizerTask" Version="0.20.8-preview" />
<PackageReference Include="Cilica.OptimizerTask"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Cilica.OptimizerTask --version 0.20.8-preview
#r "nuget: Cilica.OptimizerTask, 0.20.8-preview"
#:package Cilica.OptimizerTask@0.20.8-preview
#addin nuget:?package=Cilica.OptimizerTask&version=0.20.8-preview&prerelease
#tool nuget:?package=Cilica.OptimizerTask&version=0.20.8-preview&prerelease
Cilica
Post-build IL optimizer and intermediate representation for .NET programs (experimental).
Cilica is a continuation of DistIL.
Try Cilica Lab in your browser to explore optimization passes, control-flow graphs, and generated code.
Notable Features
- SSA-based Intermediate Representation
- Linq Expansion
- Loop Strength Reduction
- Loop Vectorization
- List Pre-sizing
- Devirtualization
- Method Inlining
- Scalar Replacement
See Optimization Passes for a detailed list of optimizations passes available.
Cilica.Cli -i input/MyLibrary.dll -o output/MyLibrary.dll
Usage
The Cilica.OptimizerTask NuGet package contains an MSBuild task which automatically invokes the optimizer on the output project assembly when building in Release mode. It requires the .NET 10+. Install the preview package with:
dotnet add package Cilica.OptimizerTask --prerelease
By default, only methods and classes annotated with [Cilica.Attributes.Optimize] will be transformed. This can be changed by setting the CilicaAllMethods project property to true:
<CilicaAllMethods>true</CilicaAllMethods>
Set RunCilica to enable or disable optimization explicitly, and use CilicaExtraArgs to pass additional CLI options.
Use --skip-module-initializers to omit explicit module-initialization checks when the runtime initializes modules before use. Cilica.OptimizerTask enables this by default with PublishAot=true; set CilicaSkipModuleInitializers=false to override it.
Use --nativeaot-compat when invoking the CLI before NativeAOT compilation. Cilica.OptimizerTask enables this automatically with PublishAot=true.
The optimizer task processes your main assembly by default. To include managed dependencies and framework assemblies in a self-contained build or publish, enable CilicaAllAssemblies:
<SelfContained>true</SelfContained>
<CilicaAllAssemblies>true</CilicaAllAssemblies>
Under this mode, assembly signatures and ReadyToRun code will be removed, and CilicaAllMethods will be set to true; set it to false to retain attribute filtering.
There's also a Cilica.Core package that exposes the optimizer and intermediate representation APIs for direct use.
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.8-preview | 63 | 11/12/2026 |
| 0.20.7-preview | 56 | 11/12/2026 |
| 0.20.6-preview | 54 | 11/12/2026 |
| 0.20.5-preview | 58 | 11/11/2026 |
| 0.20.4-preview | 56 | 11/10/2026 |
| 0.20.3-preview | 57 | 11/10/2026 |
| 0.20.2-preview | 53 | 11/10/2026 |
| 0.20.1-preview | 52 | 11/9/2026 |
| 0.20.0-preview | 55 | 11/9/2026 |
| 0.19.1-preview | 60 | 11/8/2026 |
| 0.19.0-preview | 53 | 11/8/2026 |
| 0.18.2-preview | 85 | 11/8/2026 |
| 0.18.1-preview | 261 | 11/7/2026 |
| 0.18.0-preview | 52 | 11/7/2026 |
| 0.17.0-preview | 58 | 11/5/2026 |
| 0.16.0-preview | 57 | 11/5/2026 |
| 0.15.2-preview | 55 | 11/5/2026 |
| 0.15.1-preview | 52 | 11/5/2026 |
| 0.15.0-preview | 57 | 11/5/2026 |
| 0.14.1-preview | 56 | 11/4/2026 |