2dog update
Sets the project's managed 2dog packages, native packages and Godot.NET.Sdk to the versions selected by the running tool, then restores if any files changed. Running an older tool can downgrade all three. Newer companion packages such as Avalonia keep their versions. When moving to an older Godot line, use its matching editor and check your game code and assets there.
If tracked files in the Git repository have uncommitted changes, pass --allow-dirty to proceed.
2dog update [path] [options]| Argument | Meaning |
|---|---|
path | Directory containing project.godot; defaults to the current directory |
Options
| Option | Effect |
|---|---|
--dotnet <10|11> | Also move the game, every host and the hosts' own global.json pins to that .NET version |
--dry-run | Print the plan; change nothing |
--no-restore | Skip the final dotnet restore |
--allow-dirty | Continue even if tracked files have uncommitted changes |
--install-wasm-tools | Install missing wasm-tools for browser hosts |
--install-android-workload | Install the missing android workload for Android hosts |
--update-workloads | Install missing workloads the hosts need, then run dotnet workload update for the project's SDK |
Plus the global and output options. There is no --to: pin the tool instead.
Package updates need no workloads or Android SDK. For browser or Android hosts, the tool can offer to update workloads on a terminal. It uses dotnet workload update, which updates all installed workloads for the SDK. --no-restore skips the offer, and --dry-run never checks or changes workloads.
Change the .NET Version
The game's target framework is the project's .NET version. A host may target a newer one, never an older one: it could not reference the game. --dotnet moves everything at once: the target frameworks of the game and every host, the SDK pins in the hosts' own global.json files, and the ASP.NET Core version of Blazor hosts. .NET 11 browser hosts switch to the Microsoft.NET.Sdk.WebAssembly SDK. The root global.json is yours: when its pin cannot build the new version, the command says what to change. MAUI hosts need a matching TwoDogMauiVersion, which you set yourself.
Examples
2dog update # here, after committing
2dog update --dotnet 11 # move the game and hosts to .NET 11
2dog update path/to/project --dry-run # show what would change
dnx 2dog@4.7.2.225 update # a specific tool version