Godot v4.3.stable.mono - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (12 Threads)
Issue description
My project has a dependency that is installed with NuGet. When I build the Godot project, this NuGet package tries to build an MSBuild target, and fails, because it cannot find dotnet, although dotnet is installed properly on my system.
Steps to reproduce
I have created an example project with a dependency, added to the .csproj file:
When I build the Godot project, this package tries to build an MSBuild target, and fails, because it cannot find dotnet. This is the output in Godot's "MSBuild" tab:
MSB3073: The command "dotnet --list-sdks" exited with code 127.
/Users/theome/.nuget/packages/flatsharp.compiler/7.7.0/build/FlatSharp.Compiler.targets(98,5)
This is an excerpt from the msbuild_log.txt:
Project "nuget-example.csproj" (default targets):
Exec: dotnet --list-sdks
Exec: /var/folders/w_/mdv4sslx3sg2_xk497c1vz5h0000gn/T/MSBuildTemptheome/tmpb99fda8e72d64fe99d946dee8fd19f35.exec.cmd: line 2: dotnet: command not found
/Users/theome/.nuget/packages/flatsharp.compiler/7.7.0/build/FlatSharp.Compiler.targets(98,5): error MSB3073: The command "dotnet --list-sdks" exited with code 127. [/Users/theome/nuget-example/nuget-example.csproj]
Done building project "nuget-example.csproj" -- FAILED.
This is the command in the file FlatSharp.Compiler.targets that tries to run dotnet:
dotnet is installed correctly on my machine, and I can build and run the Godot project if I don't add the dependency.
If I build and run the project from VS Code, the build process succeeds and the game launches.
If I open Godot from a shell with open /Applications/Godot_mono.app/ and build and run the project from Godot, it also works.
Setting an explicit dotnet path in Editor Settings at dotnet/editor/custom_exec_path does not solve the issue.
I would expect that the project builds without errors when I launch Godot from the Finder and then use the "Build Project" option in Godot. Would it be possible to add an Editor Setting to explicitly set environment variables for the MSBuild process?
Tested versions
System information
Godot v4.3.stable.mono - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (12 Threads)
Issue description
My project has a dependency that is installed with NuGet. When I build the Godot project, this NuGet package tries to build an MSBuild target, and fails, because it cannot find
dotnet
, althoughdotnet
is installed properly on my system.Steps to reproduce
I have created an example project with a dependency, added to the
.csproj
file:When I build the Godot project, this package tries to build an MSBuild target, and fails, because it cannot find
dotnet
. This is the output in Godot's "MSBuild" tab:This is an excerpt from the
msbuild_log.txt
:This is the command in the file
FlatSharp.Compiler.targets
that tries to rundotnet
:If I modify the file and add the following command:
then I can see in
msbuild_log.txt
thatPATH
doesn't contain the requireddotnet
path:dotnet
is installed correctly on my machine, and I can build and run the Godot project if I don't add the dependency.open /Applications/Godot_mono.app/
and build and run the project from Godot, it also works.dotnet
path in Editor Settings atdotnet/editor/custom_exec_path
does not solve the issue.I would expect that the project builds without errors when I launch Godot from the Finder and then use the "Build Project" option in Godot. Would it be possible to add an Editor Setting to explicitly set environment variables for the MSBuild process?
Minimal reproduction project (MRP)
nuget-example.zip