dotnet build error: execvp(3) failed.: No such file or directory
See original GitHub issueIssue Description
When trying to build and debug using C# extension tasks on a mac (Mojave, 10.14.6) I keep getting
execvp(3) failed.: No such file or directory
for a dotnet build
command that runs fine in Terminal.
(Edit)
Note: replacing the dotnet
command in tasks with /usr/local/share/dotnet/dotnet
helped work around this, for this mac environment.
Steps to Reproduce
- Use
dotnet new webapi -n MyService
to create an ASP.NET web API project. - Shift + Command + P and run
.NET Generate Assets for Build and Debug
. - Shift + Command + P and run
Task: Run Build Task
andbuild
.
Expected Behavior
Task to run dotnet build
successfully.
Actual Behavior
Error:
execvp(3) failed.: No such file or directory
The terminal process terminated with exit code: 1
Logs
OmniSharp log
None.
C# log
None
Environment information
VSCode version: 1.40.0 C# Extension: 1.21.8
Mono Information
OmniSharp using global mono :6.0.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.100 Commit: cd82f021f4Runtime Environment: OS Name: Mac OS X OS Version: 10.14 OS Platform: Darwin RID: osx.10.14-x64 Base Path: /usr/local/share/dotnet/sdk/3.1.100/
Host (useful for support): Version: 3.1.0 Commit: 65f04fb6db
.NET Core SDKs installed: 2.1.701 [/usr/local/share/dotnet/sdk] 3.1.100 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.12 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
bash-debug | rogalmic | 0.3.6 |
csharp | ms-vscode | 1.21.8 |
java | redhat | 0.53.1 |
markdown-preview-enhanced | shd101wyy | 0.5.0 |
plantuml | jebbs | 2.13.5 |
powershell | ms-vscode | 2019.11.0 |
python | ms-python | 2019.11.50794 |
salesforcedx-vscode | salesforce | 47.9.0 |
salesforcedx-vscode-apex | salesforce | 47.9.0 |
salesforcedx-vscode-apex-debugger | salesforce | 47.9.0 |
salesforcedx-vscode-apex-replay-debugger | salesforce | 47.9.0 |
salesforcedx-vscode-core | salesforce | 47.9.0 |
salesforcedx-vscode-lightning | salesforce | 47.9.0 |
salesforcedx-vscode-lwc | salesforce | 47.9.0 |
salesforcedx-vscode-visualforce | salesforce | 47.9.0 |
typescript-javascript-grammar | ms-vscode | 0.0.53 |
vscode-eslint | dbaeumer | 1.9.1 |
vscode-java-debug | vscjava | 0.23.0 |
vscode-java-dependency | vscjava | 0.6.0 |
vscode-java-pack | vscjava | 0.8.1 |
vscode-java-test | vscjava | 0.21.0 |
vscode-maven | vscjava | 0.20.0 |
vscodeintellicode | VisualStudioExptTeam | 1.2.0 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:14 (4 by maintainers)
Top GitHub Comments
Sorry, I found my own issue. I had this setting and it seems to break things:
It was weird because when I modified the task to just print current shell and PATH it printed the expected values.
Anyway, sorry again.
For me worked vice versa setting it to true