Build Script
build.py, in the repository root, builds all Embedix projects in the order required by
the solution's dependencies, and lets you target Windows, macOS or Linux.
Why a script instead of just dotnet build
The projects can't be built independently or in any order:
Embedix.Core.Payloadmust build first. It's a small project containing justAssemblyResolver.cs, multi-targeted (netstandard2.0,net45,net6.0) so each target framework gets its own correctly-compiled IL.Embedix.Corebuilds next. It embedsEmbedix.Core.Payload's build output (one DLL per target framework) as resources, and picks the matching one at runtime based on the target assembly's framework (mscorlib→ .NET Framework,System.Private.CoreLib/System.Runtime→ modern .NET). IfEmbedix.Core.Payloadhasn't been built yet, this step fails.Embedix.CLIandEmbedix.GUIbuild last, in any order, since both depend onEmbedix.Core.
build.py encodes this order so you don't have to remember it or get it wrong.
Requirements
- .NET SDK with
dotneton yourPATH. - Python 3.10+.
- No extra Python packages — the script only uses the standard library.
Usage
python build.py --platform windows
python build.py --platform mac
python build.py --platform linux
If you omit --platform, it's inferred from the OS you're running the script on.
Options
| Option | Default | Description |
|---|---|---|
--platform |
OS the script runs on | windows, mac or linux. Selects the runtime identifier used for publishing, and whether Embedix.GUI is built (see GUI and platform support). |
--configuration |
Release |
Passed straight to dotnet build/dotnet publish -c. Typically Release or Debug. |
--root |
The repo root build.py lives in |
Path to the repository root, if you're running the script from somewhere else or against a different clone. |
--publish |
off | Builds Embedix.CLI/Embedix.GUI with dotnet publish -r <runtime> --self-contained false instead of a plain dotnet build, producing a distributable, platform-specific output. Embedix.Core and Embedix.Core.Payload are always built with dotnet build — they're libraries, not something you publish. |
Run python build.py --help for the same reference from the script itself.
GUI and platform support
Embedix.GUI is built with Windows Forms and only runs on Windows. The script only
builds it when --platform windows; for mac and linux it's skipped automatically,
with a message explaining why. Embedix.CLI always builds, on every platform.
For a cross-platform GUI, see EmbedixStudio.
Examples
# Local development build, current OS, Debug
python build.py --configuration Debug
# Release build for Linux, ready to distribute
python build.py --platform linux --publish
# Build against a different checkout of the repo
python build.py --platform windows --root /path/to/other/Embedix
Troubleshooting
BUILD FAILED: 'dotnet' was not found on PATH.Install the .NET SDK and make suredotnet --versionworks in your terminal.BUILD FAILED: Project not found: ...Either--rootisn't pointing at the repository root, or the solution's folder layout no longer matches the paths hardcoded inbuildtools/config.py(PAYLOAD_PROJECT,CORE_PROJECT,CLI_PROJECT,GUI_PROJECT) — update them there if you've moved or renamed a project.A step fails partway through. The script stops immediately — it never continues past a failed step, since every later step depends on the ones before it succeeding.