This is my first time using Visual Studio Code and I am trying to run a simple code on it but it is giving me an error that says:
'scriptcs' is not recognized as an internal or external command, operable program or batch file.
I have this as code:
using System;
struct Employee{
public int Id { get; set; }
public string FullName { get; set; }
}
public class MyClass{
public static void Main(){
Employee obj= new Employee();
obj.FullName = "Hello World";
Console.WriteLine(obj.FullName);
}
}
I have tried installing the Scriptcs Runner, but still the same issue. Can anybody suggest something else?
Edit:
After many of your suggestions I tried the following:
- Created an entire new folder without spaces and named the files the same way.
- Re-installed the scriptcs Runner extension from VS Code Extension manager.
- Doubled checked my code. It is running on online c# compiler, but not in VS Code.
Problem is still the same. Getting the above error.