I'm facing exactly same problem with all tested dotnet 2.2 tagged docker images (e.g. mcr.microsoft.com/dotnet/core/sdk:2.2.401-bionic) since yesterday.
I'd tried a lot of other dotnet core images also.
My production application stopped build with MSB1025 error.
```
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName property should not be a directory unless UseShellExecute is set. ---> System.ComponentModel.Win32Exception: The FileName property should not be a directory unless UseShellExecute is set.
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.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs)
at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.GetNode(String msbuildLocation, String commandLineArgs, Int32 nodeId, INodePacketFactory factory, Int64 hostHandshake, Int64 clientHandshake, NodeContextTerminateDelegate terminateNode)
at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration)
at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable1 responses)
at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
at Microsoft.Build.Execution.BuildManager.ProcessPacket(Int32 node, INodePacket packet)
at Microsoft.Build.Execution.BuildManager.<>c__DisplayClass67_0.
at Microsoft.Build.Execution.BuildManager.ProcessWorkQueue(Action action)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Build.Execution.BuildManager.EndBuild()
at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary2 globalProperties, Dictionary2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, Boolean detailedSummary, ISet1 warningsAsErrors, ISet1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, String[] inputResultsCaches, String outputResultsCache)
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName property should not be a directory unless UseShellExecute is set. ---> System.ComponentModel.Win32Exception: The FileName property should not be a directory unless UseShellExecute is set.
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, Dictionary2 globalProperties, Dictionary2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, Boolean detailedSummary, ISet1 warningsAsErrors, ISet1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, String[] inputResultsCaches, String outputResultsCache)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled Exception: Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName property should not be a directory unless UseShellExecute is set. ---> System.ComponentModel.Win32Exception: The FileName property should not be a directory unless UseShellExecute is set.
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, Dictionary2 globalProperties, Dictionary2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, Boolean detailedSummary, ISet1 warningsAsErrors, ISet1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, String[] inputResultsCaches, String outputResultsCache)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)
````
I also used the command RUN TERM=xterm dotnet build -bl ..... in my Dockerfile but no success.
_Originally posted by @FernandoPucci in https://github.com/dotnet/core/issues/3309#issuecomment-528335866_
I'm facing exactly same problem with all tested dotnet 2.2 tagged docker images (e.g. mcr.microsoft.com/dotnet/core/sdk:2.2.401-bionic) since yesterday.
I'd tried a lot of other dotnet core images also.My production application stopped build with MSB1025 error.
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild. Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName property should not be a directory unless UseShellExecute is set. ---> System.ComponentModel.Win32Exception: The FileName property should not be a directory unless UseShellExecute is set. 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.BackEnd.NodeProviderOutOfProcBase.LaunchNode(String msbuildLocation, String commandLineArgs) at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.GetNode(String msbuildLocation, String commandLineArgs, Int32 nodeId, INodePacketFactory factory, Int64 hostHandshake, Int64 clientHandshake, NodeContextTerminateDelegate terminateNode) at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode(Int32 nodeId, INodePacketFactory factory, NodeConfiguration configuration) at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration) at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity) at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses) at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker) at Microsoft.Build.Execution.BuildManager.ProcessPacket(Int32 node, INodePacket packet) at Microsoft.Build.Execution.BuildManager.<>c__DisplayClass67_0.<Microsoft.Build.BackEnd.INodePacketHandler.PacketReceived>b__0() at Microsoft.Build.Execution.BuildManager.ProcessWorkQueue(Action action) --- End of stack trace from previous location where exception was thrown --- at Microsoft.Build.Execution.BuildManager.EndBuild() 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, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, String[] inputResultsCaches, String outputResultsCache) MSBUILD : error MSB1025: An internal failure occurred while running MSBuild. Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName property should not be a directory unless UseShellExecute is set. ---> System.ComponentModel.Win32Exception: The FileName property should not be a directory unless UseShellExecute is set. 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, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, String[] inputResultsCaches, String outputResultsCache) at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) Unhandled Exception: Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName property should not be a directory unless UseShellExecute is set. ---> System.ComponentModel.Win32Exception: The FileName property should not be a directory unless UseShellExecute is set. 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, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, Boolean isolateProjects, Boolean graphBuild, String[] inputResultsCaches, String outputResultsCache) at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)I also used the command
RUN TERM=xterm dotnet build -bl .....in my Dockerfile but no success._Originally posted by @FernandoPucci in #3309 (comment)_
Strangely, but the same Dockerfile and project, in an Windows Host and Docker toolbox it's works!
Are you by any chance running on Ubuntu 19.04 with kernel 5.0.0-27-generic?
I am facing exactly same issue today, although I do not know it used to be working or not. We were using dotnet 2.1 and now trying to update to 2.2.
FYI, following is my machine's uname -a result:
Linux b35f84517783 5.0.0-27-generic #28-Ubuntu SMP Tue Aug 20 19:53:07 UTC 2019 x86_64 GNU/Linux
Yeah, you're on the same 5.0.0-27-generic kernel. Reverting to kernel 5.0.0-25-generic fixes the problem for me. I followed the instructions at https://karlcode.owtelse.com/blog/2017/03/13/reverting-to-a-previous-kernel/ to do so.
@livarcocc @nguerrera not sure if msbuild or docker image issue, can you assist?
I don't believe this belongs on my team. This seems like some weird interaction of the API (corefx) with this new kernel. I would ping someone from corefx for this.
Reverted to 5.0.25 and works like a charm! So many Thanks!
This seems like some weird interaction of the API (corefx) with this new kernel. I would ping someone from corefx for this.
@karelz @stephentoub
Just wanted to add that I got the same error yesterday, after applying the usual Ubuntu (19.04) updates, which installed kernel 5.0.0-27-generic. Reverting to 5.0.0-25-generic fixed the problem for me too. Thanks for that!
.Net Core version: 2.2.401
I am facing exactly same issue today, although I do not know it used to be working or not. We were using dotnet 2.1 and now trying to update to 2.2.
FYI, following is my machine's uname -a result:
Linux b35f84517783 5.0.0-27-generic #28-Ubuntu SMP Tue Aug 20 19:53:07 UTC 2019 x86_64 GNU/Linux
Verified the same project with same docker image works fine under the system with 4.15.0-1044-aws. (I tested by creating an EC2 instance quickly rather than downgrading my dev box's kernel just yet).
FYI, I can also confirm that without using docker image, there are no issues on building the project under the kernal 5.0.0-27-generic. I tested it successfully with dotnet version 2.2.401 without docker (running on host) on the same machine I ran with docker.
So I guess there are something going on with the new 5.0.0-27-generic kernel and dotnet core docker image.
I guess this is now tracked by https://github.com/dotnet/corefx/issues/40850 . we'll investigate.
There's a bug report over at Ubuntu Launchpad: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843018 . You can upvote the bug report by clicking the "This bug affects me too" link just below the issue title.
Most helpful comment
Yeah, you're on the same 5.0.0-27-generic kernel. Reverting to kernel 5.0.0-25-generic fixes the problem for me. I followed the instructions at https://karlcode.owtelse.com/blog/2017/03/13/reverting-to-a-previous-kernel/ to do so.