首页 > 解决方案 > 出现错误:/bin/sh scriptcs: command not found

问题描述

我正在使用 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-codescriptcsvscode-code-runner

解决方案


考虑到的先决条件filipw/vscode-scriptcs-runner

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

确保从脚本所在的 shell 会话启动 VSCode $PATH(意味着which scriptcs不返回空输出)


推荐阅读