Skip to content

dotnetup: Update defaultinstall command to set path preference #53742

@nagilson

Description

@nagilson

Context

PR #53464 review identified that dotnetup defaultinstall is about the PathPreference mode setting, and that we aren't doing that across all platforms correctly yet.

Related PR Comment

  • WalkthroughWorkflows.cs L390@dsplaisted: "dotnetup defaultinstall isn't really related to whether runtimes are copied from the admin install. It's more about the 'PathPreference' mode setting. We should update the defaultinstall command to set the path preference in the config, and to be able to handle the difference between ShellProfile and FullPathReplacement. We can file a follow-up issue for that."

Description

The defaultinstall command should:

  1. Set the PathPreference in the dotnetup config
  2. Handle the difference between ShellProfile (modifying shell profile to prepend dotnetup path) and FullPathReplacement (replacing the system PATH entry)
  3. Not be confused with runtime/SDK migration from admin installs

References to dotnetup defaultinstall were removed from the migration prompts in the walkthrough as part of PR #53464, but the command itself needs updating.

Acceptance Criteria

  • dotnetup defaultinstall sets PathPreference in the config
  • Support both ShellProfile and FullPathReplacement modes
  • Add help text explaining what each mode does
  • Add tests for the updated command behavior

Relevant Code

  • src/Installer/dotnetup/Commands/Walkthrough/WalkthroughWorkflows.cs
  • src/Installer/dotnetup/DotnetupConfig.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    dotnetupWork items around the proposed `dotnetup` bootstrapper/toolchain management tool and library

    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