Skip to content

dev_build_docs

Francisco Dias edited this page Apr 9, 2026 · 5 revisions

Building extgen

extgen is a C#/.NET console tool. The only build dependency is the .NET 9 SDK.


Requirements

  • .NET SDK 9.x

    dotnet --version

Build (Release)

From the repository root:

dotnet restore
dotnet build -c Release

Run locally

dotnet run -c Release -- --help
dotnet run -c Release -- --config ./config.json

Publish (self-contained binaries)

Publishing creates a distributable output folder under ./publish.

Windows (x64)

dotnet publish -c Release -r win-x64 --self-contained true -o ./publish/win-x64

macOS (Apple Silicon)

dotnet publish -c Release -r osx-arm64 --self-contained true -o ./publish/osx-arm64

macOS (Intel)

dotnet publish -c Release -r osx-x64 --self-contained true -o ./publish/osx-x64

Linux (x64)

dotnet publish -c Release -r linux-x64 --self-contained true -o ./publish/linux-x64

Note

Set --self-contained false if you prefer a smaller output and are comfortable requiring users to install .NET 9.


Verify

After building or publishing:

extgen --help
extgen --init ./test_project

config.json and extgen.schema.json should appear in the target folder.


Building with Visual Studio

Requirements

  • Visual Studio 2022 or newer
  • .NET 9 SDK
  • Workload: .NET desktop development

Steps

  1. Open extgen.sln in Visual Studio.
  2. Select Release (or Debug) and Any CPU.
  3. Build via Build → Build Solution or Ctrl+Shift+B.

Output appears under bin/Release/net9.0/.

To run from Visual Studio: set extgen as the startup project and add command-line arguments under Project → Properties → Debug.


Building with Visual Studio Code

Requirements

  • VS Code
  • .NET 9 SDK
  • Extension: C# Dev Kit (recommended)

Steps

  1. Open the repository folder in VS Code.
  2. Open a terminal and run:
dotnet restore
dotnet build -c Release

To run:

dotnet run -- --help

Debugging

Set a breakpoint in Program.cs and press F5. VS Code generates .vscode/launch.json on first run. Pass arguments by editing the args field:

"args": ["--config", "./config.json"]

Cross-Platform Notes

  • The same project builds on Windows, macOS, and Linux.
  • Console SDKs are not required to build extgen itself - only to build the CMake projects that extgen generates.