Skip to content

2dog doctor ​

Checks the project and this machine without building, and applies the fixes it can. Safe repairs use --fix; announced changes use --fix-all or the interactive checklist.

bash
2dog doctor [path] [options]
ArgumentMeaning
pathDirectory containing project.godot; defaults to the current directory

Options ​

OptionEffect
--fixApply the safe fixes, then check again
--fix-allAlso apply announced fixes, including workloads required by the selected build
--install-wasm-toolsInstall missing wasm-tools for browser hosts, then re-check
--install-android-workloadInstall 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>Only explain an existing build, restore or runtime log; - reads stdin
--ignore <id>Drop a finding by check id; repeatable
--strictWarnings count as findings for the exit code
--offlineSkip the nuget.org check for a newer tool
--list-checksPrint every check and build-log signature

Plus the global and output options; -v lists the passed checks too.

Missing browser/Android tooling is informational until --build selects a host that needs it. Excluded solution hosts do not require their workloads. Installing a required workload is an announced fix: select it in the checklist or use --fix-all. 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; anything more complex is reported as info, so use --build to evaluate it. Solution migration keeps the .sln as a numbered .sln.old backup.

Exit codes ​

CodeMeaning
0No errors remain (warnings allowed unless --strict)
2Doctor could not run: no project.godot, unreadable files
3Errors remain (warnings too under --strict), the --build failed, or --log found a problem

Examples ​

bash
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 warning

Checks ​

Ids are stable; --ignore <id> drops one.

Environment ​

IdPasses when
env.dotnet-sdka .NET 10 SDK is installed
env.global-jsonthe root global.json pin is satisfied by an installed SDK
env.wasm-toolswasm-tools is available for the selected browser build; otherwise optional
env.maui-workloadMAUI workloads are available for selected MAUI builds
env.android-workloadandroid is available for the selected Android build; otherwise optional
env.android-sdkAndroid SDK paths and components are available for the selected Android build; otherwise optional
env.host-platformthis OS and architecture have 2dog native packages
env.godot4GODOT4 points at an existing Godot executable for IDE debugging
env.overridesGODOTSHARP_DIR and the other layout overrides point at what they claim
env.packages-restoredthe engine, tools and native packages are in the NuGet cache

Layout ​

IdPasses when
layout.load-problemsevery project file parses
layout.game-csprojthe game csproj exists at the project root
layout.assembly-nameproject.godot names the assembly and the csproj matches it
layout.multiple-root-csproja single csproj at the root, or assembly_name picks one
layout.spaced-namethe .NET project name contains no whitespace
layout.root-build-targetsDirectory.Build.targets provides the deep-clean target
layout.root-build-propsDirectory.Build.props holds the shared package versions
layout.root-global-jsonglobal.json pins a wasm-capable SDK when a browser host exists
layout.test-runnertest hosts and global.json use Microsoft.Testing.Platform for dotnet test

Game csproj ​

IdPasses when
game.sdkthe game csproj uses Godot.NET.Sdk
game.sdk-mismatchGodot.NET.Sdk matches the Godot line 2dog.engine was built for
game.target-frameworkthe game csproj targets net10.0
game.propertiesEnableDynamicLoading and AllowUnsafeBlocks are set
game.bindingsthe game csproj references 2dog.godotsharp
game.default-item-excludesevery host folder is excluded from the game's default globs

Hosts ​

IdPasses when
host.gdignoreevery host folder carries a .gdignore
host.project-referenceevery ProjectReference points at an existing project
host.godot-project-dirGodotProjectDir points at the Godot project
host.variantTwoDogVariant / TwoDogWebVariant is supported by the host platform
host.buildtype-deprecatedthe deprecated TwoDogBuildType property is gone
host.publish-aotno WinForms, REPL, browser or Blazor host enables PublishAot
host.publish-singlefilePublishSingleFile is only enabled by browser hosts or alongside PublishAot
host.webxr-threadsWebXR hosts do not enable WasmEnableThreads
host.duplicate-analyzershosts referencing the game strip the duplicate Godot analyzers
host.app-manifestthe app.manifest a host declares exists
host.web-props-shimbrowser hosts chain to the root Directory.Build.props
host.web-global-jsonbrowser hosts carry their own global.json
host.trimmer-rootbrowser hosts root the game assembly for the trimmer
host.blazor-clientthe Blazor client project exists and publishes 2dog.engine
host.blazor-launch-settingsBlazor hosts carry a Development launchSettings.json
host.windows-onlyWindows-only hosts are noted on other platforms

Solution ​

IdPasses when
sln.existsa solution exists at the project root
sln.multipleexactly one solution contains the game project
sln.legacy-formatthe solution uses the .slnx format
sln.contains-gamethe solution lists the game project
sln.contains-hoststhe solution lists every host project
sln.build-exclusionsbrowser, Android and WinUI hosts are excluded from plain solution builds

Versions ​

IdPasses when
ver.managed-elsewhereversions expressed through your own properties are noted, not judged
ver.props-invalidthe TwoDog* versions in Directory.Build.props are readable versions
ver.literal-versionshost csprojs use the shared version properties, not literals
ver.twodog-consistentevery 2dog package uses the same version
ver.twodog-outdatedthe 2dog packages are at this tool's version
ver.twodog-newerthe project is not ahead of this tool
ver.nativesthe native packages are exact-pinned on the engine's Godot line
ver.godot-line-consistentTwoDogGodotVersion matches the game project's Godot.NET.Sdk
ver.godotsharp-editorGodotSharpEditor in the test host matches the Godot.NET.Sdk
ver.companionsAvalonia and the other companion packages are not mixed
ver.tool-latesta newer 2dog tool on nuget.org is mentioned

Presets ​

IdPasses when
preset.fileexport_presets.cfg exists
preset.webthe 'Web' preset exists when a browser host does
preset.androidthe Android hosts' export preset ('Android' by default) exists, unless they ship a pre-exported pck
preset.desktopthe per-OS desktop presets exist

Godot settings ​

IdPasses when
godot.features-lineconfig/features names the Godot line the SDK targets
godot.xr-shadersa WebXR host has xr/shaders/enabled.web set
godot.import-stampthe project has been imported at least once

Build-log signatures ​

Failures --build and --log recognize. A match gets a title, the offending line and the fixing command; other errors follow.

IdFailure
build.variant-invalidTwoDogVariant is not release, debug or editor
build.buildtype-deprecatedthe deprecated TwoDogBuildType property is set
build.publish-aotPublishAot does not support the editor variant
build.publish-singlefilePublishSingleFile is not supported for desktop hosts
build.godot-sdk-mismatchGodot.NET.Sdk and 2dog.engine are on different Godot lines
build.no-import-capabilityno import capability (2dog.<rid>.editor and 2dog.tools packages missing)
build.import-requiredthe build requires an import (TwoDogRequireImport=true) and has no import capability
build.desktop-preset-missingthe desktop export preset is missing from export_presets.cfg
build.web-preset-missingthe 'Web' export preset is missing from export_presets.cfg
build.no-export-capabilityno export capability (2dog.<rid>.editor and 2dog.tools packages missing)
build.web-payload-missingthe browser natives (2dog.browser-wasm) are not restored
build.native-missingthe native libgodot for this platform was not found
build.nu1213the '2dog' tool package is referenced as a library
build.package-not-founda package version is missing from the feeds
build.version-conflictconflicting package versions across the solution
build.msb3277-godotsharptwo GodotSharp versions meet in one build
build.wasm-tools-missingthe wasm-tools workload is not installed
build.android-workload-missingthe android workload is not installed
build.sdk-too-oldthe installed .NET SDK is too old for net10.0
build.global-json-unresolvedno installed SDK satisfies global.json
build.godot-sdk-not-foundthe Godot.NET.Sdk version could not be downloaded
build.il1035the trimmer cannot see a root assembly
build.export-failedthe Godot pck export failed
build.godotplugins-missingGodotPlugins.dll not found at runtime
build.native-variant-missingthe native library for this TwoDogVariant is missing at runtime
build.variant-fallbackthe engine fell back to another native variant
build.host-leakhost sources compile into the game assembly

2dog is Free and Libre Open Source under the MIT License.
2dog is not affiliated with or endorsed by the Godot Foundation.
Godot is licensed under the MIT License. @icons made by Voxy under the MIT License.
Continuous Integration compute graciously supported by RunsOn.