dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.68k stars 1.06k forks source link

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

Open Calinou opened 10 months ago

Calinou commented 10 months ago

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 :slightly_smiling_face:

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

dotnet-issue-labeler[bot] commented 10 months ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

nagilson commented 5 months ago

@marcpopMSFT Who owns this installation page?

marcpopMSFT commented 5 months ago

@rbhanda @mairaw ?