Skip to content

hensou/asdf-dotnet

Repository files navigation

asdf-dotnet Build Lint

dotnet plugin for the asdf version manager. This repo is inspired by asdf-dotnet-core by @emersonsoares.

⚠️ Currently, as reported in #6, there could be some issues with csharp-ls failing to detect the dotnet installation.

Contents

Dependencies

  • bash, curl, grep, sed, git: generic POSIX utilities.

Install

Installing this plugin:

asdf plugin add dotnet
# or
asdf plugin add dotnet https://github.com/hensou/asdf-dotnet.git

Installing a dotnet version:

# Show all installable versions
asdf list-all dotnet

# Install specific version
asdf install dotnet latest

# Set a version globally (on your ~/.tool-versions file)
asdf global dotnet latest

# Now dotnet commands are available
dotnet --version

Check asdf readme for more instructions on how to install & manage versions.

Updating global environment variables

If you need to:

  • update/set DOTNET_ROOT variable
  • update/set MsBuildSDksPath variable
  • disable telemetry (i.e. set DOTNET_CLI_TELEMETRY_OPTOUT to 1)

then, according to your shell, execute one of the following commands:

For bash, use:

. ~/.asdf/plugins/dotnet/set-dotnet-env.bash

For zsh shell, instead use:

. ~/.asdf/plugins/dotnet/set-dotnet-env.zsh

For fish shell, instead use:

source ~/.asdf/plugins/dotnet/set-dotnet-env.fish

For xonsh shell, instead use:

source ~/.asdf/plugins/dotnet/set-dotnet-env.xsh

Contributing

Contributions of any kind welcome! See the contributing guide.

Thanks goes to these contributors!

License

See LICENSE © Henrique