Skip to content

Configuration

Set 2dog properties in your host project's .csproj.

Properties

PropertyDefaultPurpose
GodotProjectDirNoneDirectory containing project.godot; enables automatic resource import and is embedded for Engine.ResolveProjectDir()
TwoDogVariantreleaseNative desktop variant: release, debug, or editor
TwoDogRemoveDuplicateGodotAnalyzersfalseRemoves duplicate analyzers from a host that also references a Godot.NET.Sdk game project
TwoDogExportPacktrueDesktop publishes export the game content as an exe-adjacent .pck; false skips it (also disables the web host's pack export)
TwoDogDesktopExportPresetRID-mappedExport preset for the desktop pack; defaults to Windows Desktop, Linux, or macOS by publish target

The standard nested-host setup is:

xml
<PropertyGroup>
  <GodotProjectDir>..</GodotProjectDir>
  <TwoDogVariant Condition="'$(Configuration)' == 'Debug'">debug</TwoDogVariant>
  <TwoDogVariant Condition="'$(Configuration)' == 'Editor'">editor</TwoDogVariant>
  <TwoDogRemoveDuplicateGodotAnalyzers>true</TwoDogRemoveDuplicateGodotAnalyzers>
</PropertyGroup>

GodotProjectDir is resolved relative to the project file and embedded as an absolute path. The game project itself must keep its Godot source generator; only the host should remove duplicate analyzers.

See Selecting a Variant for the variant mapping and Resource Import for import properties.

Packages and Versions

Reference 2dog.engine from generic hosts:

xml
<PackageReference Include="2dog.engine" Version="4.7.1.*"/>

Package versions begin with the embedded Godot version. Pin manual references to your project's Godot line, as above, so NuGet does not silently select a newer engine line. Projects scaffolded by 2dog configure package versions for you.

2dog.engine selects the platform meta package for the current OS: 2dog.win-x64, 2dog.linux-x64, or 2dog.osx-arm64. Each meta package pins the release, debug, and editor native packages. The selected native is copied as libgodot-<variant>.dll, .so, or .dylib and loaded by that name.

For xUnit, reference 2dog.xunit; it brings in 2dog.engine. Browser hosts also reference 2dog.browser-wasm; see Browser Host for web-specific properties and packaging.