✅ Using dotnet CLI with net5.0 on macos
I've got the dotnet cli working, with the latest 9.x SDK. I'm looking to help a friend with a net 5.0 project. My understanding is that core is backwards compatible and I'd be able to run something like
dotnet new console -f net5.0
, but that failed as the only available version is 9.x. I've since installed net 5.0 separately using the dotnet-install
script, but as that install to a different location, it's still not available to use via dotnet new
. Is there a way to allow the dotnet cli to use 5.0 at all?9 Replies
What does
dotnet --list-sdks
show?I was wondering if re-installing via
dotnet-install.sh
would work if I gave it the --install-dir /usr/local/dotnet
option, but I'm wary of potential conflicting conventions for the install output across tools
Any reason you're using
dotnet-install.sh
in the first place?couldn't figure how to get it otherwise, unless I've missed something obvious with the dotnet cli
https://dotnet.microsoft.com/en-us/download/dotnet/5.0
Just download the .pkg installer
I do tend to make it hard for myself.... cheers
It's on Homebrew as well: https://formulae.brew.sh/cask/dotnet-sdk
installer worked perfectly, that'll teach me to overcomplicate. thanks very much!
:Ok: