获取错误:/ bin / sh scriptcs:找不到命令

问题描述 投票:6回答:1

我正在使用Visual Studio Code for Mac,运行扩展CodeRunner。我有一个简单的程序:

using System;
namespace HelloWorldApplication {
class HelloWorld {
   static void Main(string[] args) {
      Console.WriteLine("hellowol");
   }
 }
}

当我使用右上角的播放按钮运行它时,我收到以下错误:

/bin/sh scriptcs: command not found

然后

[Done] exited with code=127 in 0.008 seconds

该程序未显示所需的输出。

编辑:非常感谢@VonC。他的方法很有效。任何人的专业提示:使用安装脚本

brew install scriptcs
c# visual-studio-code coderunner scriptcs
1个回答
3
投票

考虑the prerequisitefilipw/vscode-scriptcs-runner是:

scriptcs应该安装在你的机器上。

确保从shell会话中启动VSCode,其中scriptcs位于$PATH中(意味着which scriptcs不返回空输出)

© www.soinside.com 2019 - 2024. All rights reserved.