Symptoms
Building a Rider plugin project in IntelliJ IDEA on macOS fails during the Gradle build with:
Execution failed for task ':compileDotNet' (registered in build file 'build.gradle.kts').
> Process 'command 'dotnet'' finished with non-zero exit value 1
Exec failed, error: 2 (No such file or directory)
This happens when IntelliJ IDEA is launched from Finder or the Dock.
Environment
- Customer type: Personal and commercial customers
- Region affected: All regions
- Product affected: IntelliJ IDEA (Rider plugin development) on macOS
Cause
macOS apps launched from Finder or the Dock don't inherit the shell PATH. IntelliJ IDEA can't find the dotnet executable even when the .NET SDK is installed and visible in the terminal.
Resolution
Launch IntelliJ IDEA from the terminal so it inherits the full shell environment:
/Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea
Run the Gradle build again. The :compileDotNet task should complete.
Comments
0 comments
Please sign in to leave a comment.