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.

dotnet build error: execvp(3) failed.: No such file or directory

See original GitHub issue

Issue 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

  1. Use dotnet new webapi -n MyService to create an ASP.NET web API project.
  2. Shift + Command + P and run .NET Generate Assets for Build and Debug.
  3. Shift + Command + P and run Task: Run Build Task and build.

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.0
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.100 Commit: cd82f021f4

Runtime 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:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

22reactions
Meligycommented, Dec 14, 2019

Sorry, I found my own issue. I had this setting and it seems to break things:

"terminal.integrated.inheritEnv": false,

It was weird because when I modified the task to just print current shell and PATH it printed the expected values.

Anyway, sorry again.

3reactions
deus42commented, Aug 27, 2020

Sorry, I found my own issue. I had this setting and it seems to break things:

"terminal.integrated.inheritEnv": false,

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't C# code build when debugging in vs code (.NET ...
This is the error message I get in the terminal while debugging: execvp(3) failed.: No such file or directory The terminal process "dotnet...
Read more >
error trying to exec 'as': execvp: No such file or directory-bash
This is caused by a mounting problem. On linux you have /bin and /usr/bin , no big deal. On Cygwin you have C:\cygwin\bin...
Read more >
How to fix “exec user process caused „no such file or directory ...
We ran into the following error when creating Docker-based GitHub Actions: the “standard_init_linux.go:211: exec user process caused „no ...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
systemPrefs with at least two files" status:RESOLVED resolution:OBSOLETE ... line 17: build-2/lisp/lisp: No such file or directory" status:RESOLVED ...
Read more >
execvp: No such file or directory - linux - Super User
execvp : No such file or directory doesn't look like a bash error message. It is probably coming from the aura script, which...
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