reckfellENGINE

Building with C#: glue, API and SDK

Current .NET requirements, generation order, package contents and diagnostic failures.

On this page

A C# package includes the native editor/templates with managed integration enabled, generated bindings, managed API, tools and SDK packages. Building one EXE does not establish the complete package.

Current requirements

Source/modules/mono/global.json requests .NET SDK 10.0.100 with rollForward=latestMajor. ReckfellSharp, ReckfellSharpEditor and editor tools target net10.0. The old “.NET SDK 8+” requirement is insufficient for this tree. Check the selected SDK from the managed-project directory where global.json applies.

Shell
dotnet --info
python modules/mono/build_scripts/build_assemblies.py --help

Run the second command from Source. Building requires an SDK; runtime contents of the shipped editor/game need separate verification. mono is the current module’s option/path name; do not rename it to dotnet yourself.

Workflow

  1. Build the native editor with module_mono_enabled=yes and matching architecture/precision. Exports need corresponding template_debug/template_release builds with that module.
  2. Generate C# API from that editor’s ClassDB, without running a game project. This creates sources rather than building managed API DLLs.
  3. Check the generation log and files. After registered types/methods/parameters change, product version alone does not establish binding freshness.
  4. Run build_assemblies.py for the managed solutions and inspect outputs. Match precision and deprecated settings to the native configuration.
  5. Assemble the complete editor/export package and check project opening, C# building, execution and export.

For a configured Windows x64 environment, the sequence is below; replace editor with the actual name of your output:

PowerShell
python -m SCons platform=windows target=editor arch=x86_64 module_mono_enabled=yes
$editor = "./bin/reckfell.windows.editor.x86_64.mono.console.exe"
& $editor --headless --generate-mono-glue modules/mono/glue
python modules/mono/build_scripts/build_assemblies.py --reckfell-output-dir bin --reckfell-platform windows --werror

These full-build commands were not executed here. Generation diagnostics used the installed editor and separate QA output; working Source files and the installed SDK were not replaced.

Expected artifacts

The generator writes C# API under ReckfellSharp/ReckfellSharp/Generated and ReckfellSharp/ReckfellSharpEditor/Generated relative to the specified glue directory. Ordinary source builds use modules/mono/glue.

build_assemblies.py builds managed solutions and copies API, XML/PDB and supporting files to ReckfellSharp/Api/Debug and Release inside reckfell-output-dir. Corresponding MSBuild projects/targets produce tools and NuGet packages. An arbitrary output directory is not automatically a complete portable distribution.

The editor needs matching API and tools beside the native binary; retain required runtime files and dependencies when distributing it. C# game distribution needs testing independently of startup on a machine with the SDK installed.

build_assemblies.py options

OptionPurpose
--reckfell-output-dirRequired API output-data directory
--reckfell-platformPlatform configuration for managed tools; does not cross-compile the native engine
--precision=doubleMatch native precision=double; single is the default
--no-deprecatedMatch native deprecated=no
--dev-debugDebug tool configuration; API follows its own Debug/Release build sequence
--push-nupkgs-localCopy packages to a local feed; also enables clearing corresponding cached versions through targets
--werrorTreat compilation warnings as errors in supported stages

Do not change product version 1.0.0 to work around NuGet caching or require clearing the whole shared cache. Separate package sets from different builds: record feeds, versions and hashes; use a separate NUGET_PACKAGES environment when appropriate. NuGet.Config configures local feeds. Packages with the same number can contain different build outputs.

Observed generation failures

The checked invocation outside a game project created 1187 C# files, printed a successful-generation message and exited with code 0. Its log still contains 24 ERROR and 174 WARNING messages, including unresolved members in embedded XML documentation and Core-documentation references to editor types.

This operation is recorded as failed generation, not a healthy SDK. Files remain in QA and were not installed. Check logs, expected files, managed API compilation and actual project execution; exit 0 and “successfully generated” are insufficient. The current CLI handler can exit 0 after reporting errors.

The generator also retains hidden service wrappers, including the known ReckfellExtension stubs. A C# method declaration does not establish its functionality: see the extension-resource API.

Diagnose failures

SymptomCheck
Missing SDK/target frameworkSelected dotnet, global.json and net10.0
Native editor does not understand the glue flagCorrect binary, enabled mono and supported generation mode
Generated files accompanied by ERROR messagesDo not accept the package; investigate the references/types and check API compilation
API mismatch at startupConsistent native API, glue, managed DLLs, precision and deprecated settings
Restore uses an old packageNuGet feeds, exact version, chosen environment’s cache and package hash
Works only on the developer machineComplete runtime, tools and export package

This verification executed --help, dotnet --info and isolated glue generation. It did not rebuild the native engine, managed engine solutions, packages or an exported game.

Continue with SCons configuration, Windows builds.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.