Skip to content

"dotnet run" for project targeting .NET Framework fails with unhelpful error on Linux #10269

Open
@dsplaisted

Description

@dsplaisted

Trying to dotnet run a project targeting .NET Framework fails with the following error on Linux (and probably Mac):

System.ComponentModel.Win32Exception (8): Exec format error
   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)

We should fail with a more graceful error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions