Skip to content

Instructions for installing the SDK for macOS through the command line are incorrect #36949

Open
@Calinou

Description

@Calinou

Describe the bug

I'm looking to install the .NET 8.0 SDK for macOS exclusively through the command line using SSH. This would installation to be automated without having to use Homebrew, which doesn't have .NET 8.0 yet.

However, the CLI instructions provided on the post-download macOS SDK download page don't work, as they're likely tailored for Linux only:

image

The warning box at the bottom even mentions Linux by name, although it happens to be perfectly accurate for macOS as well 🙂

I've also tried following instructions from https://apple.stackexchange.com/questions/72226/installing-pkg-with-terminal, but I get the following error:

❯ sudo installer -pkg dotnet-sdk-8.0.100-osx-arm64.pkg -target CurrentUserHomeDirectory
installer: Package name is Microsoft .NET SDK 8.0.100 (arm64)
installer: Installing at base path /var/root
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.

To Reproduce

Run the commands listed on the post-download page:

mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-8.0.100-osx-arm64.pkg -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
$ ls ~/dotnet 
com.microsoft.dotnet.dev.8.0.100.component.osx.arm64.pkgcom.microsoft.dotnet.dev.8.0.100.component.osx.arm64.pkg                com.microsoft.dotnet.pack.targeting.8.0.0.component.osx.arm64.pkgcom.microsoft.dotnet.pack.targeting.8.0.0.component.osx.arm64.pkg                                      com.microsoft.standard.pack.targeting.2.1.0.component.osx.arm64.pkgcom.microsoft.standard.pack.targeting.2.1.0.component.osx.arm64.pkg  ScriptsScripts
com.microsoft.dotnet.hostfxr.8.0.0.component.osx.arm64.pkgcom.microsoft.dotnet.hostfxr.8.0.0.component.osx.arm64.pkg            com.microsoft.dotnet.sharedframework.Microsoft.NETCore.App..component.osx.arm64.pkgcom.microsoft.dotnet.sharedframework.Microsoft.NETCore.App..component.osx.arm64.pkg  DistributionDistribution                                                                                                                
com.microsoft.dotnet.pack.apphost.8.0.0.component.osx.arm64.pkgcom.microsoft.dotnet.pack.apphost.8.0.0.component.osx.arm64.pkg  com.microsoft.dotnet.sharedhost.8.0.0.component.osx.arm64.pkgcom.microsoft.dotnet.sharedhost.8.0.0.component.osx.arm64.pkg                                              ResourcesResources                                                                                                                      

Notice how ~/dotnet doesn't contain any binaries you could run directly, so adding that folder directly to PATH has no real effect and running dotnet won't find anything.

Exceptions (if any)

N/A

Further technical details

  • macOS Ventura, 2020 M1 Mac mini (Apple Silicon)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions