Skip to content

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.

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>Explain an existing build, restore or runtime log and run no checks; - reads stdin
--ignore <id>Drop a finding by check id; repeatable
--strictCount warnings as findings for the exit code
--offlineSkip the nuget.org check for a newer tool
--list-checksPrint 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 ​

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.long-pathsWindows long paths are enabled when the project has a browser host
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.ios-workloadios is available for the selected iOS build; otherwise optional
env.xcodeXcode with the iOS platform is installed on this Mac; elsewhere a note that iOS builds need a Mac
env.qt-toolchainCMake, Ninja and a C++ compiler are available for the selected Qt 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, Qt, browser or Blazor host enables PublishAot
host.publish-singlefileno REPL host enables PublishSingleFile
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.engine-referencehosts using a precision-neutral 2dog package reference 2dog.engine
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
host.qt-dirQt hosts outside win-x64 point QtDir at a Qt 6 install

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-elsewheredoctor notes versions that come from your own properties, but does not check them
ver.props-invalidthe TwoDog* versions in Directory.Build.props are readable versions
ver.custom-versionscustom versions receive best-effort checks without public release upgrade advice
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.iosthe iOS hosts' export preset ('iOS' by default) exists, unless they ship a pre-exported pck; a warning for MAUI hosts off a Mac
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 ​

--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.

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 does not support the editor variant
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; the Godot logo is by Andrea Calabró under CC BY 4.0. @icons made by Voxy under the MIT License.
Continuous Integration compute graciously supported by Blacksmith.