0

I am setting up .Net core via ASDF v0.9.0 on Mac, after installing dotnet-core plugin and setting a version (3.1.416) dotnet is still not found

zsh: command not found: dotnet-core

Here is my .zshrc

alias rbrew="/usr/local/bin/brew"

. /opt/homebrew/opt/asdf/libexec/asdf.sh

#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"

Looking at the available shims I don't see dotnet, even if I try to reshim

% asdf shim-versions dotnet      
asdf: unknown shim dotnet

What do I miss? Any hint to point me in the right direction?

Beppe C
  • 11,256
  • 2
  • 19
  • 41
  • What "dotnet-core plugin" are you talking about? .NET Core isn't a plugin and the .NET Core team wouldn't release a dotnet tool that has the same name as the runtime. Changing the name from .NET Core to .NET caused enough problems already. If you want to work with .NET Core you need to install the [.NET (Core) 6 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0). Once you do you'll be able to use the `dotnet` command to build, publish, test etc or execute [.NET tools](https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools) that are installed afterwards – Panagiotis Kanavos Dec 23 '21 at 08:13
  • Thanks Panagiotis, I am trying to use ASDF runtime manager and to install the dotnet-core plugin https://github.com/emersonsoares/asdf-dotnet-core. I don't want to install .Net Core SDK directly but manage that via ASDF (like other frameworks I am working with) – Beppe C Dec 23 '21 at 09:10
  • Explain that in the question itself then. Don't assume people know what ASDF is - I've been building .NET Core apps on Mac for 2 years and never tried this. You still haven't explained if you want the runtime or SDK though. There's no `dotnet-core` command one way or another. If you install either the runtime or SDK, you get a `dotnet` command. As for your specific problem, if you installed either, .NET would be available under `/usr/local/share/dotnet/x64/dotnet/` – Panagiotis Kanavos Dec 23 '21 at 09:20
  • I have clarified the question and removed the .NET tag (left the `asdf-vm` tag) – Beppe C Dec 23 '21 at 09:35

1 Answers1

1

[Answering my own question after comments pointed me in the right direction]

The .Net 3.1 SDK is not supported on Mac ARM architecture (either installing via ASDF or .Net binaries). When trying with version 6.0.101 it works as expected

% asdf install dotnet-core 6.0.101
Downloading the CLI installer
Installing the CLI requested version 6.0.101. Please wait, installation may take a few minutes.
...
Installation finished successfully.

% asdf local dotnet-core 6.0.101
% dotnet --version 
6.0.101
Beppe C
  • 11,256
  • 2
  • 19
  • 41