Skip to content

Generic .NET Configuration ​

Set properties in MyGame.2dog.csproj, which references 2dog.engine. The global settings control the game directory, resource import, analyzers, and native variant.

Publishing ​

PropertyDefaultPurpose
TwoDogExportPacktrueExport content to an executable-adjacent .pck; false skips export, so supply game content separately
TwoDogDesktopExportPresetRID-mappedPreset in export_presets.cfg: Windows Desktop, Linux, or macOS, according to the publish target
PublishSelfContainedtrue in the generated hostBundle the .NET runtime; false requires an installed runtime
PublishAotfalseCompile the host and managed game code into a native executable
bash
dotnet publish MyGame.2dog -c Release -r win-x64 -p:PublishAot=true

Native AOT supports debug and release variants; see requirements and trimmer roots. PublishSingleFile is unsupported for ordinary desktop publishing; use Native AOT when you need a single native executable.

Console Behavior ​

The generated host uses OutputType=WinExe in Release to hide the Windows console, and Exe otherwise. Set OutputType=Exe to keep console output in Release. Linux and macOS treat WinExe as Exe.

See the generic host guide for running the host and passing Godot arguments.