I am trying to run a simple C# console app and I get the error: scriptcs: command not found
.
In a question asked 5 years ago, the answer states to brew install scriptcs
. The only problem is that when I attempted that, I got this error: scriptcs has been disabled because it is not maintained upstream!
. My program works ok with the dotnet run
command in the terminal, within VSCode, but not just with the run button.
Please how do I resolve this?
Thank You.
2
Answers
if you use the
Code Runner
extension. reference this vidoe.open or create
settings.json
file in workspace folder, typecode-runner
, after selectcode-runner.executorMap
option, and change"csharp": "scriptcs"
to"csharp": "dotnet run"
, it was work for me.You’re probably using
Code Runner
extension, here’s the solution for this scenario:Ctrl + Shift + P
orShift + Cmd + P
settings.json
code-runner.executorMap
and locatecsharp
"csharp": "scriptcs"
to"csharp": "dotnet run"