我正在使用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
考虑the prerequisite为filipw/vscode-scriptcs-runner
是:
scriptcs应该安装在你的机器上。
确保从shell会话中启动VSCode,其中scriptcs位于$PATH
中(意味着which scriptcs
不返回空输出)