godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.86k stars 20.15k forks source link

3.4.beta2 macOS Mono editor can't find dotnet CLI despite it being installed #50965

Open wenbingzhang opened 3 years ago

wenbingzhang commented 3 years ago

Godot version

v3.4.beta2

System information

macos 11.4 GLES2

Issue description

modules/mono/glue/gd_glue.cpp:249 - Cannot find executable for 'dotnet CLI'. Fallback to MSBuild from Mono. editor/editor_node.cpp:5379 - An EditorPlugin build callback failed.

dotnet5 path: /Applications/xxxxx/bin/dotnet/dotnet

Terminal startup is ok /Applications/Godot_mono.app/Contents/MacOS/Godot --path /Users/xxxx/Documents/Project/Godot/test_mono --editor

Steps to reproduce

https://user-images.githubusercontent.com/13162606/127280304-76610907-28c5-4038-bc2d-c61ba8438160.mov

Minimal reproduction project

test_mono.zip

bruvzg commented 3 years ago

dotnet5 path: /Applications/xxxxx/bin/dotnet/dotnet

What's the source of this .NET installation? Valid lookup paths for the .NET are:

/Library/Frameworks/Mono.framework/Versions/Current/bin/
/opt/local/bin/
/usr/local/var/homebrew/linked/mono/bin/
/usr/local/bin/
/usr/local/bin/dotnet/
/usr/local/share/dotnet/

Which should cover Mono and .NET installed from homebrew, MacPorts and https://dotnet.microsoft.com/download/dotnet

wenbingzhang commented 3 years ago

I installed it using binary

.net added $PATH

bruvzg commented 3 years ago

.net added $PATH

Where is it set? PATH set in the terminal configs (.zshrc/.zshprofile etc.) is for the terminal only, it's not affecting apps in any way. ~You can set environment for the apps by using launchctl setenv VARNAME VALUE command.~

wenbingzhang commented 3 years ago

configured in. zshrc.

launchctl setenv VARNAME VALUE invalid

bruvzg commented 3 years ago

launchctl setenv VARNAME VALUE invalid

It's working for the custom variables, but no for the PATH. Seems like there's no way to set PATH for GUI apps anymore.

wenbingzhang commented 3 years ago

In view of this situation, can you add a configurable UI or environment variable?