Skip to content

Add a one-shot execution mode for .NET tools a la npx #31103

Open
@baronfel

Description

@baronfel

Is your feature request related to a problem? Please describe.

Currently to use a .NET global tool that may or may not be installed, you need to perform a series of steps

  • install the tool globally
  • ensure the global tool install directory is on the PATH
  • invoke the tool
  • (optionally) remove the tool

And for local tools, you need to

  • create a tool manifest
  • install the tool
  • invoke the tool
  • (optionally) remove the tool

When all you really want to do is

  • invoke the tool

We should consider adding a mode of running a .NET tool that combines all of these steps into one user-facing step.

Describe the solution you'd like

Something akin to

dotnet toolx [-g|--global] [--rm] [--version toolVersion] <toolName> [tool args and options]

that would combine all of the preceding steps into one logical command. The tool would be installed (locally by default, creating a manifest if necessary), executed passing along whatever args, and then optionally being uninstalled after execution. If a version was supplied and the locally-available version of the tool (if any) doesn't satisfy that version, the specified version would be installed.

Additional context

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions