'Command not found' 当 运行 Linux 的 Windows 子系统上的 Ubuntu .NET Core 控制台

'Command not found' when running .NET Core console in Ubuntu on Windows Subsystem for Linux

我已经下载了 .NET Core 3(预览版),并且在 Visual Studio 2019(预览版)中创建了一个由 class 库和控制台程序组成的 hello world 项目。该程序在 Windows.

上运行

我有 Windows Linux 运行 Ubuntu 16.04 的子系统,我安装了 dot net 以便 dotnet --info returns 一些东西(非错误).还需要其他步骤吗?

如果我转到我的控制台应用程序二进制文件夹,然后 shift+鼠标右键单击以获取 'Open Linux shell here' 菜单项并选择该选项,然后我的 Ubuntu window 打开与控制台应用程序可执行文件相同的目录。

在 bash 提示符下,如果我键入可执行文件名称(使用 without.exe 或 without.exe)并且大小写正确,它只会报告 'Command not found'.

我想知道我错过了哪一步。

可执行文件名称不是 shell 的已知命令。你需要 dotnet <EXECUTABLENAME>