Skip to content

dev_build_docs

DiasFranciscoA edited this page Feb 10, 2026 · 3 revisions

extgen - Building extgen πŸ› οΈ

extgen is a C#/.NET console tool. To build it you only need .NET 9 SDK.


βœ… Requirements

  • .NET SDK 9.x

    • Verify install:

      dotnet --version

πŸš€ Build (Release)

From the repository root (or the folder containing the .sln / .csproj):

dotnet restore
dotnet build -c Release

▢️ Run locally

dotnet run -c Release -- --help

Example:

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

πŸ“ If you prefer a smaller output and you’re okay requiring users to install .NET 9, set --self-contained false.


βœ… Quick sanity check

After build/publish, run:

extgen --help

Or:

extgen --init ./test_project

You should see config.json + extgen.schema.json generated in the folder.


🧩 Building with Visual Studio

extgen can be built directly from Visual Studio on Windows.

Requirements

  • Visual Studio 2022 (or newer)

  • .NET 9 SDK installed

  • Workloads:

    • βœ”οΈ .NET desktop development

Steps

  1. Open the solution file (extgen.sln) in Visual Studio

  2. Select configuration:

    • Release (recommended) or Debug
  3. Select platform:

    • Any CPU
  4. Build:

    • Build β†’ Build Solution
    • or press Ctrl + Shift + B

The output binaries will appear under:

bin/Release/net9.0/

You can also run the tool directly from Visual Studio:

  • Set extgen as the startup project
  • Press F5 or Ctrl + F5
  • Add command-line arguments in Project β†’ Properties β†’ Debug

🧩 Building with Visual Studio Code

Visual Studio Code is fully supported and works great cross-platform.

Requirements

  • VS Code

  • .NET 9 SDK

  • VS Code extensions:

    • 🧩 C# Dev Kit (recommended)
    • 🧩 .NET Install Tool (optional but helpful)

Steps

  1. Open the repository folder in VS Code
  2. Open a terminal (`Ctrl + ``)
  3. Run:
dotnet restore
dotnet build -c Release

To run:

dotnet run -- --help

🐞 Debugging in VS Code

  • Open Program.cs
  • Set a breakpoint
  • Press F5
  • VS Code will auto-generate a .vscode/launch.json on first run

You can pass arguments by editing:

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

🌍 Cross-Platform Notes

  • The same project builds on Windows, macOS, and Linux
  • No platform-specific code is required to build extgen itself
  • Console SDKs are not required to build extgen β€” only to build the generated CMake projects

✨ Summary

  • βœ… CLI build: dotnet build
  • βœ… Visual Studio: open .sln and build
  • βœ… VS Code: build & debug via dotnet
  • βœ… Single dependency: .NET 9

extgen is intentionally boring to build β€” so you can focus on generating cool stuff πŸ˜„