ionpath.compiler
1.18.0
See the version list below for details.
dotnet tool install --global ionpath.compiler --version 1.18.0
dotnet new tool-manifest
dotnet tool install --local ionpath.compiler --version 1.18.0
#tool dotnet:?package=ionpath.compiler&version=1.18.0
nuke :add-package ionpath.compiler --version 1.18.0
ionpath.compiler
ionc, the IonPath compiler and language server — and an MSBuild SDK that runs it during the
build, so the generated C# never has to be committed.
As a command-line tool
dotnet tool install -g ionpath.compiler
ionc compile # in the directory that holds ion.config.json
As an MSBuild SDK: C# generated at build time
Add the SDK to the project that holds ion.config.json:
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="ionpath.compiler" Version="x.y.z" />
<ItemGroup>
<PackageReference Include="ionpath.runtime.client" Version="x.y.z" />
<PackageReference Include="ionpath.runtime.network" Version="x.y.z" />
</ItemGroup>
</Project>
Several projects can share one version through global.json, and then drop Version:
{ "msbuild-sdks": { "ionpath.compiler": "x.y.z" } }
Before compilation the build runs this package's ionc over the project, writes the sources to
obj/<configuration>/<tfm>/ion/, and compiles them. It is an SDK rather than a
PackageReference because NuGet does not allow a PackageReference to a dotnet tool package
(NU1212); the SDK form uses the very same package.
Keep the dotnet generator in ion.config.json, but without outputs — the build chooses the
directory, and without outputs ionc compile stops writing C# files of its own:
"generators": {
"dotnet": { "features": ["models", "client", "server"] }
}
Other generators (browser, rust) are unaffected and are still produced by ionc compile.
Moving an existing project over
- Add the
<Sdk>element. - Remove
outputsfrom thedotnetgenerator. - Delete what
ionc compilegenerated there:globals.cs,models/,client/,server/.
If outputs is left in place, the build warns: ionc compile would keep writing sources that the
build compiles a second time.
Diagnostics
Ion errors and warnings are reported as build errors and warnings, positioned in the .ion
source, so they appear in the IDE's error list and navigate to the offending line. A file that
fails to parse fails the build (the CLI only skips it).
Properties
| Property | Default | Meaning |
|---|---|---|
IonGenerateOnBuild |
true |
Turns generation off. |
IonProjectDirectory |
the project directory | Directory holding ion.config.json; every *.ion below it is compiled. |
IonOutputDir |
$(IntermediateOutputPath)ion\ |
Where the sources are generated. The build owns it: every *.cs in it is deleted before each run. |
IonLockMode |
check |
What the build does with ion.lock.json — see below. check, update, frozen or none. |
IonCompilerPath |
this package's ionc.dll |
Another build of the compiler. |
IonDotnetHostPath |
the dotnet running the build |
The host that runs ionc.dll. |
The lock file
The build validates the schema against ion.lock.json but, by default, never writes it. The lock
is a ratchet — whatever it records may not be removed again — and a build runs on every save, so
recording each one would turn every half-finished edit into a baseline: add a field, save, rename
it, and the build would fail on the rename. Instead:
- While editing (
check, the default): only a real break of the recorded contract fails the build. Anything not recorded yet can be added, renamed and removed freely; a lock that is behind the schema is mentioned as info (ION0071), nothing more. - When the change is done, record it once and commit the lock:
dotnet build -p:IonLockMode=update(orionc compile). The file is only rewritten when its content changes, so an unchanged lock keeps its timestamp. - In CI, build with
-p:IonLockMode=frozen: it fails with ION0071 when the committed lock does not record the committed schema, so a contract change cannot land without its baseline. noneskips lock validation altogether.
A deliberate break of the recorded contract is acknowledged the same way as before, with
ionc lock update.
The generator only runs when an input changed: the .ion files, ion.config.json,
ion.lock.json, the sources of external modules, the project file, or one of the properties above.
Limitations
- External
modulesare resolved for type checking, but the build does not addProjectReferences for them the wayionc compilepatches a generated csproj; reference the module's project yourself. - Requires the .NET 10 runtime (or later) on the build machine.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.1 | 89 | 9/26/2026 |
| 2.0.0 | 69 | 9/23/2026 |
| 1.18.0 | 72 | 9/22/2026 |
| 1.17.0 | 107 | 8/25/2026 |
| 1.16.0 | 189 | 8/19/2026 |
| 1.15.0 | 112 | 8/15/2026 |
| 1.14.0 | 148 | 5/21/2026 |
| 1.13.0 | 120 | 5/21/2026 |
| 1.12.0 | 128 | 5/9/2026 |
| 1.11.0 | 124 | 5/9/2026 |
| 1.10.0 | 122 | 5/9/2026 |
| 1.9.0 | 132 | 5/9/2026 |
| 1.8.0 | 125 | 5/8/2026 |
| 1.7.0 | 119 | 5/8/2026 |
| 1.6.0 | 126 | 5/8/2026 |
| 1.5.0 | 131 | 5/8/2026 |
| 1.4.0 | 121 | 5/7/2026 |
| 1.3.4 | 132 | 4/28/2026 |
| 1.3.3 | 122 | 4/28/2026 |
| 1.3.2 | 126 | 4/22/2026 |