question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

M1 Apple Monterey: Dotnet tool not found in zsh shell

See original GitHub issue

Describe the bug

Installing VS x64 on M1 Apple silicon macOS Monterey and launching a global tool does not work out of the box.

To Reproduce

❯ tr ':' '\n' <<< "$PATH" | grep dotnet
/usr/local/share/dotnet
~/.dotnet/tools
  • Install any dotnet global tool
dotnet tool install --global dotnet-format
  • Try to run the globally installed tool

Exceptions (if any)

❯ dotnet-format
zsh: command not found: dotnet-format

Further technical details

  • Include the output of dotnet --info
❯ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.402
 Commit:    e9d3381880

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  12.0
 OS Platform: Darwin
 RID:         osx-x64
 Base Path:   /usr/local/share/dotnet/sdk/5.0.402/

Host (useful for support):
  Version: 5.0.11
  Commit:  f431858f8b

.NET SDKs installed:
  3.1.414 [/usr/local/share/dotnet/sdk]
  5.0.402 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  • The IDE (VS / VS Code/ VS4Mac) you’re running on, and its version
Visual studio 2019
visualstudioformacinstaller-8.10.13.2
  • Zsh version
❯ zsh --version
zsh 5.8 (x86_64-apple-darwin21.0)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
cicoriascommented, Jan 8, 2023

This occurs on Mac arm too (M1/m2) Apple Silicon and with 7.x of the dotnet sdk. Really need to address this as it causes such problems for folks that are putting dotnet on their Macs.

1reaction
jrdoddscommented, Dec 23, 2021

@sshquack changing the content of the /etc/paths.d/dotnet-cli-tools file from ~/.dotnet/tools to $HOME/.dotnet/tools will not resolve the issue. The paths in the files in /etc/paths.d must be literal paths.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet command is not found in my Mac m1 terminal
1. removing all files of the current dotnet installation. · 2. reinstalling the dotnet sdk · 3. adding a symlink to the current...
Read more >
Mac M1: CLI SPX Command not found
dotnet tool install --global Microsoft.CognitiveServices.Speech.CLI but when I type spx help. I get zsh: command not found: spx.
Read more >
How to Fix Zsh Command Not Found Error on macOS [5 ...
This article explains the zsh command not found error on Mac or Linux, along with the exact reasons and 5 solutions to the...
Read more >
Zsh | Apple Developer Forums
Hi, I downloaded and ran a command line tool (on M1 Max) that natively supports Apple Silicon. I was able to run the...
Read more >
TextureImporter error - Mac OS Monterey 12.6
I have installed mgcb editor as instructed in all Mac tutorials I could find but it doesn't seem to work. I have both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found