Skip to content

Support PowerShell profile modification on Windows for both Windows PowerShell and pwsh #53962

Description

@dsplaisted

Summary

Follow-up from the shell profile work in #53447.

dotnetup currently uses a single PowerShell shell provider and only wires profile modification for the Unix pwsh location. We still need a Windows-specific implementation that correctly handles both Windows PowerShell and PowerShell 7+.

Proposed work

  • detect and update the correct PowerShell profile location(s) on Windows
  • investigate $PROFILE usage and the host-specific profile search order
  • handle Documents / OneDrive redirection and other non-default home-directory layouts
  • decide whether dotnetup should modify only the active PowerShell flavor or both by default
  • keep the generated script compatible across both shells where possible
  • add regression tests for the Windows profile path logic

Related

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions