spark.dotnet-install 0.3.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global spark.dotnet-install --version 0.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local spark.dotnet-install --version 0.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=spark.dotnet-install&version=0.3.0
                    
nuke :add-package spark.dotnet-install --version 0.3.0
                    

dotnet-install

Managed dotnet-install for developers who want the familiar shell-script workflow in a compiled CLI.

The tool resolves .NET release metadata, builds an install plan, downloads the selected SDK or runtime artifact, and runs the install flow from a single command.

Get Started

Install as a global tool:

dotnet tool install --global spark.dotnet-install

Or install into a local tool manifest:

dotnet new tool-manifest
dotnet tool install --local spark.dotnet-install

Then start with the commands most people need:

dotnet-install --help
dotnet-install version
dotnet-install --dry-run --channel LTS
dotnet-install --version 10.0.x
dotnet-install --jsonfile ./global.json
dotnet-install upgrade 10.0.x --dry-run
dotnet-install upgrade 10.0.x 11.0.x
dotnet-install upgrade 10.0.x --runtime
dotnet-install self-update --dry-run
dotnet-install self-update --prerelease

Common Tasks

Install the latest LTS SDK:

dotnet-install --channel LTS

Install a specific SDK exactly:

dotnet-install --version 10.0.201

Install the SDK pinned by global.json:

dotnet-install --jsonfile ./global.json

When global.json contains sdk.rollForward, permissive policies are mapped to the closest supported wildcard selector. For example, feature uses 10.0.x, and minor uses 10.x.

Install only a runtime:

dotnet-install --runtime aspnetcore --version 10.0.x

Install into a custom directory:

dotnet-install --version 10.0.x --install-dir ./tools/dotnet

Preview a removal before deleting anything:

dotnet-install remove 8.0.204 --dry-run

Preview an upgrade before installing/removing anything:

dotnet-install upgrade 10.0.x --dry-run

Upgrade multiple SDK bands in one command:

dotnet-install upgrade 10.0.x 11.0.x

Upgrade an SDK but keep its related runtime packs and shared runtime:

dotnet-install upgrade 10.0.x --sdk-only

Upgrade only the .NET runtime in a channel:

dotnet-install upgrade 10.0.x --runtime

Highlights

  • Familiar dotnet-install semantics in managed code
  • Strong option binding and validation with System.CommandLine
  • Channel, exact-version, and wildcard version selection
  • Download, extraction, install verification, and feed/proxy override support
  • PATH updates for the current process, with optional user PATH persistence on Windows

Notes

  • --dry-run stops after plan generation
  • --persist-path is supported only on Windows and cannot be combined with --no-path
  • --jsonfile installs the SDK version pinned by global.json, honors compatible SDK rollForward policies, and cannot be combined with runtime-only installs
  • --internal and --os are parsed compatibility switches; full shell-script parity for these switches is still in progress
  • If another .NET installation is already discoverable, PATH mutation is skipped to avoid shadowing it
  • remove is destructive and should be previewed with --dry-run first
  • upgrade skips installation when the resolved version is already present and removes other installed versions in the same major.minor channel
  • upgrade removes the related runtime by default when pruning obsolete SDKs; use --sdk-only to keep the runtime installed
  • self-update replaces the current executable with the latest matching GitHub release asset for the current RID
  • self-update --prerelease includes preview releases, and prerelease builds enable that behavior by default

Project

  • Package: spark.dotnet-install
  • Repository: https://github.com/WeihanLi/dotnet-install

See the repository README for source, development, GitHub Action, and release details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.4.0-preview-1 43 6/11/2026
0.3.0 102 5/27/2026
0.2.0 123 4/18/2026
0.1.0 107 4/6/2026

See the repository release notes for release-specific changes.