Skip to content

dotnetup: Add dotnetup migrate command for system-to-local install conversion #53839

@nagilson

Description

@nagilson

Summary

Add a dedicated dotnetup migrate command that converts system-level .NET installs to dotnetup-managed local installs. Remove the migration prompt from the minimal walkthrough and install commands (except on very first run).

Current Behavior

PromptInstallsToMigrateIfDesired is called during the walkthrough and install flows, prompting the user to convert system installs on every interactive invocation that detects new system installs.

Proposed Behavior

New command: dotnetup migrate

  • Enumerates system-level installs using existing GetExistingSystemInstalls logic.
  • Displays the list and prompts for confirmation (reuse existing display/prompt code).
  • Converts selected installs to dotnetup-managed installs using existing conversion logic.
  • Supports --noninteractive to auto-accept (converts all without prompting).
  • Supports --no-progress flag.

Changes to existing flows

  • First-ever invocation (no config file exists): Continue to prompt about migration as part of the walkthrough/install flow. This is the user's first interaction with dotnetup and migration is relevant context.
  • Subsequent invocations: Do not prompt about migration in the install commands. Do prompt in the walkthrough still.
  • Be careful not to duplicate the "is first run" detection logic — reuse DotnetupConfig.Exists() or an equivalent single check.

Acceptance Criteria

  • dotnetup migrate command exists and converts system installs to local.
  • Migration prompt still appears on the very first walkthrough/install (config doesn't exist yet).
  • Migration prompt does not appear on subsequent install invocations.
  • dotnetup migrate works in both interactive and non-interactive modes.
  • No duplication of first-run detection logic.
  • Help text for dotnetup migrate explains what it does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetupWork items around the proposed `dotnetup` bootstrapper/toolchain management tool and libraryuntriagedRequest triage from a team member

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions