2dog doctor
Checks the project and this machine without a build, and applies the fixes that it can. Use --fix for safe repairs. Use --fix-all or the interactive checklist for announced fixes.
Custom engine versions, such as a fork's version suffix, produce a ver.custom-versions warning. Doctor checks full version labels for consistency and uses their numeric parts to check the Godot line. It skips public release upgrade comparisons; matching labels cannot establish compatibility between a fork and its GDExtensions. 2dog's own Godot prerelease versions are checked like releases, including the Godot label of the natives and Godot.NET.Sdk.
2dog doctor [path] [options]| Argument | Meaning |
|---|---|
path | Directory containing project.godot; defaults to the current directory |
Options
| Option | Effect |
|---|---|
--fix | Apply the safe fixes, then check again |
--fix-all | Also apply announced fixes, including workloads required by the selected build |
--install-wasm-tools | Install missing wasm-tools for browser hosts, then re-check |
--install-android-workload | Install the missing android workload for Android hosts, then re-check |
--build [target] | Run dotnet build of the solution, or a host folder or project, and explain known failures |
-c, --configuration <Cfg> | Configuration for variant checks and --build (default Debug) |
--log <file> | Explain an existing build, restore or runtime log and run no checks; - reads stdin |
--ignore <id> | Drop a finding by check id; repeatable |
--strict | Count warnings as findings for the exit code |
--offline | Skip the nuget.org check for a newer tool |
--list-checks | Print every check and build-log signature |
The global and output options also apply. With -v, doctor also lists the passed checks.
Missing browser/Android tooling is informational until --build selects a host that needs it. Hosts excluded from plain solution builds do not need their workloads. To install a required workload, select it in the checklist or use --fix-all. This is an announced fix. The install flags explicitly request installation for existing hosts without a build. --fix alone does not install workloads.
Variant checks read literal values and simple Configuration conditions; doctor reports anything more complex as info. To evaluate it, use --build. Solution migration keeps the .sln as a numbered .sln.old backup.
Exit codes
| Code | Meaning |
|---|---|
0 | No errors remain (warnings allowed unless --strict) |
2 | Doctor could not run: no project.godot, unreadable files |
3 | Errors remain (warnings too under --strict), the --build failed, or --log found a problem |
Examples
2dog doctor # check, then ask which fixes to apply
2dog doctor --fix # apply the safe fixes unattended
2dog doctor --build MyGame.web -c Release # build one host and explain failures
2dog doctor --build MyGame.web/MyGame.web.csproj # a project path also works
2dog doctor --log build.log # explain an existing log
dotnet build 2>&1 | 2dog doctor --log - # or a piped one
2dog doctor --json --strict | jq '.doctor.summary' # CI: exit 3 on any warningChecks
Ids are stable; --ignore <id> drops one.
Environment
| Id | Passes when |
|---|---|
env.dotnet-sdk | a .NET 10 SDK is installed |
env.global-json | the root global.json pin is satisfied by an installed SDK |
env.wasm-tools | wasm-tools is available for the selected browser build; otherwise optional |
env.long-paths | Windows long paths are enabled when the project has a browser host |
env.maui-workload | MAUI workloads are available for selected MAUI builds |
env.android-workload | android is available for the selected Android build; otherwise optional |
env.android-sdk | Android SDK paths and components are available for the selected Android build; otherwise optional |
env.ios-workload | ios is available for the selected iOS build; otherwise optional |
env.xcode | Xcode with the iOS platform is installed on this Mac; elsewhere a note that iOS builds need a Mac |
env.qt-toolchain | CMake, Ninja and a C++ compiler are available for the selected Qt build; otherwise optional |
env.host-platform | this OS and architecture have 2dog native packages |
env.godot4 | GODOT4 points at an existing Godot executable for IDE debugging |
env.overrides | GODOTSHARP_DIR and the other layout overrides point at what they claim |
env.packages-restored | the engine, tools and native packages are in the NuGet cache |
Layout
| Id | Passes when |
|---|---|
layout.load-problems | every project file parses |
layout.game-csproj | the game csproj exists at the project root |
layout.assembly-name | project.godot names the assembly and the csproj matches it |
layout.multiple-root-csproj | a single csproj at the root, or assembly_name picks one |
layout.spaced-name | the .NET project name contains no whitespace |
layout.root-build-targets | Directory.Build.targets provides the deep-clean target |
layout.root-build-props | Directory.Build.props holds the shared package versions |
layout.root-global-json | global.json pins a wasm-capable SDK when a browser host exists |
layout.test-runner | test hosts and global.json use Microsoft.Testing.Platform for dotnet test |
Game csproj
| Id | Passes when |
|---|---|
game.sdk | the game csproj uses Godot.NET.Sdk |
game.sdk-mismatch | Godot.NET.Sdk matches the Godot line 2dog.engine was built for |
game.target-framework | the game csproj targets net10.0 |
game.properties | EnableDynamicLoading and AllowUnsafeBlocks are set |
game.bindings | the game csproj references 2dog.godotsharp |
game.default-item-excludes | every host folder is excluded from the game's default globs |
Hosts
| Id | Passes when |
|---|---|
host.gdignore | every host folder carries a .gdignore |
host.project-reference | every ProjectReference points at an existing project |
host.godot-project-dir | GodotProjectDir points at the Godot project |
host.variant | TwoDogVariant / TwoDogWebVariant is supported by the host platform |
host.buildtype-deprecated | the deprecated TwoDogBuildType property is gone |
host.publish-aot | no WinForms, REPL, Qt, browser or Blazor host enables PublishAot |
host.publish-singlefile | no REPL host enables PublishSingleFile |
host.webxr-threads | WebXR hosts do not enable WasmEnableThreads |
host.duplicate-analyzers | hosts referencing the game strip the duplicate Godot analyzers |
host.app-manifest | the app.manifest a host declares exists |
host.web-props-shim | browser hosts chain to the root Directory.Build.props |
host.web-global-json | browser hosts carry their own global.json |
host.trimmer-root | browser hosts root the game assembly for the trimmer |
host.engine-reference | hosts using a precision-neutral 2dog package reference 2dog.engine |
host.blazor-client | the Blazor client project exists and publishes 2dog.engine |
host.blazor-launch-settings | Blazor hosts carry a Development launchSettings.json |
host.windows-only | Windows-only hosts are noted on other platforms |
host.qt-dir | Qt hosts outside win-x64 point QtDir at a Qt 6 install |
Solution
| Id | Passes when |
|---|---|
sln.exists | a solution exists at the project root |
sln.multiple | exactly one solution contains the game project |
sln.legacy-format | the solution uses the .slnx format |
sln.contains-game | the solution lists the game project |
sln.contains-hosts | the solution lists every host project |
sln.build-exclusions | browser, Android and WinUI hosts are excluded from plain solution builds |
Versions
| Id | Passes when |
|---|---|
ver.managed-elsewhere | doctor notes versions that come from your own properties, but does not check them |
ver.props-invalid | the TwoDog* versions in Directory.Build.props are readable versions |
ver.custom-versions | custom versions receive best-effort checks without public release upgrade advice |
ver.literal-versions | host csprojs use the shared version properties, not literals |
ver.twodog-consistent | every 2dog package uses the same version |
ver.twodog-outdated | the 2dog packages are at this tool's version |
ver.twodog-newer | the project is not ahead of this tool |
ver.natives | the native packages are exact-pinned on the engine's Godot line |
ver.godot-line-consistent | TwoDogGodotVersion matches the game project's Godot.NET.Sdk |
ver.godotsharp-editor | GodotSharpEditor in the test host matches the Godot.NET.Sdk |
ver.companions | Avalonia and the other companion packages are not mixed |
ver.tool-latest | a newer 2dog tool on nuget.org is mentioned |
Presets
| Id | Passes when |
|---|---|
preset.file | export_presets.cfg exists |
preset.web | the 'Web' preset exists when a browser host does |
preset.android | the Android hosts' export preset ('Android' by default) exists, unless they ship a pre-exported pck |
preset.ios | the iOS hosts' export preset ('iOS' by default) exists, unless they ship a pre-exported pck; a warning for MAUI hosts off a Mac |
preset.desktop | the per-OS desktop presets exist |
Godot settings
| Id | Passes when |
|---|---|
godot.features-line | config/features names the Godot line the SDK targets |
godot.xr-shaders | a WebXR host has xr/shaders/enabled.web set |
godot.import-stamp | the project has been imported at least once |
Build-log signatures
--build and --log recognize these failures. For each match, doctor shows a title, the log line with the error and the command that fixes it. Doctor lists other errors after the matches.
| Id | Failure |
|---|---|
build.variant-invalid | TwoDogVariant is not release, debug or editor |
build.buildtype-deprecated | the deprecated TwoDogBuildType property is set |
build.publish-aot | PublishAot does not support the editor variant |
build.publish-singlefile | PublishSingleFile does not support the editor variant |
build.godot-sdk-mismatch | Godot.NET.Sdk and 2dog.engine are on different Godot lines |
build.no-import-capability | no import capability (2dog.<rid>.editor and 2dog.tools packages missing) |
build.import-required | the build requires an import (TwoDogRequireImport=true) and has no import capability |
build.desktop-preset-missing | the desktop export preset is missing from export_presets.cfg |
build.web-preset-missing | the 'Web' export preset is missing from export_presets.cfg |
build.no-export-capability | no export capability (2dog.<rid>.editor and 2dog.tools packages missing) |
build.web-payload-missing | the browser natives (2dog.browser-wasm) are not restored |
build.native-missing | the native libgodot for this platform was not found |
build.nu1213 | the '2dog' tool package is referenced as a library |
build.package-not-found | a package version is missing from the feeds |
build.version-conflict | conflicting package versions across the solution |
build.msb3277-godotsharp | two GodotSharp versions meet in one build |
build.wasm-tools-missing | the wasm-tools workload is not installed |
build.android-workload-missing | the android workload is not installed |
build.sdk-too-old | the installed .NET SDK is too old for net10.0 |
build.global-json-unresolved | no installed SDK satisfies global.json |
build.godot-sdk-not-found | the Godot.NET.Sdk version could not be downloaded |
build.il1035 | the trimmer cannot see a root assembly |
build.export-failed | the Godot pck export failed |
build.godotplugins-missing | GodotPlugins.dll not found at runtime |
build.native-variant-missing | the native library for this TwoDogVariant is missing at runtime |
build.variant-fallback | the engine fell back to another native variant |
build.host-leak | host sources compile into the game assembly |