Dotnet core NodeFailedToLaunchException

Hi there,

I’ve just started using gitpod and want to get setup with a dotnet core image, I’ve been able to get the configuration setup no problem however, when running dotnet run etc I get the following exception:

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.BackEnd.NodeFailedToLaunchException: No such file or directory
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
   --- End of inner exception stack trace ---
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, Boolean lowPriority, String[] inputResultsCaches, String outputResultsCache)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled exception. Microsoft.Build.BackEnd.NodeFailedToLaunchException: No such file or directory
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
   --- End of inner exception stack trace ---
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, Boolean lowPriority, String[] inputResultsCaches, String outputResultsCache)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
   at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)

Here is my gitpod config file

image: gitpod/workspace-dotnet

tasks:
  - init: dotnet build
    command: dotnet run

I’m open to any ideas
Cheers

Hey Callum, welcome to our community :tada:

I’m not too familiar with dotnet much myself, but I followed our template: .NET in Gitpod and dotnet run worked. Can you share more of your config?

Happy Coding!

I am also seeing this issue, running a basic console F# solution. My config is similar to OP’s, but with a couple extensions installed:

image: gitpod/workspace-dotnet
tasks:
- init: dotnet build
  command: dotnet run

vscode:
  extensions:
    - Ionide.Ionide-fsharp@5.5.9
    - muhammad-sammy.csharp

On my last commit to this project (~25 days ago) everything was working alright. Took a break for 25 days, opened up a new workspace this morning. Now the projects in the solution “fail to load” in the left sidebar, and none of the dotnet xxx commands seem to succeed.

@robertkleffner Are these features contributed by external extensions? Could you try to downgrade them?

@Pauline That template no longer works, in fact; it fails with the error:

/home/gitpod/dotnet/sdk/5.0.205/Roslyn/Microsoft.CSharp.Core.targets(71,5): error MSB6004: The specified task executable location "/run/containerd/io.containerd.runtime.v2.task/k8s.io/3c6886d4c832d3ace340c8396da8b50b05a483110ff649b6c91f08881b8a626a/rootfs/home/gitpod/dotnet/dotnet" is invalid. [/workspace/template-dotnet-core-cli-csharp/dotnetcore.csproj]

See Template is currently br

It is probably related to containerd mount is inva