SOLVED_Linux, VisualCode, C#: scriptcs: not found, exited with code127

730 Views Asked by At

I'm new to programming, I'm following a programming class where we learn C# using Visual Studio on Windows.

I wanted to practice also at home on my Linux Mint PC.

I've built a simple program where the user inputs two numbers, and the program generates a random number.

When using Sublime Text Editor and executing using Mono, it works perfectly, but I would like to be able to use Visual Studio Code as it's similar to Visual Studio we are using at school. However, it seems to be a complete mess to install on a Linux machine. I've followed tons of links and installed extensions and everything, and even tried to follow instructions given on users here who had the same issue, but I can't understand them and well it doesn't work. I just get on a link that tells me to go to another link which also tells me to go to another link, and I'm just totally confused on what exactly I need to do.

using System;
class random
{
  static void Main(string[] args)
  {
      Random rnd = new Random();
      Console.WriteLine("Entrez le nombre minimum: ");
      int minimum = Convert.ToInt32(Console.ReadLine());
      Console.WriteLine("Entrez le nombre maximum: ");
      int maximum = Convert.ToInt32(Console.ReadLine());
      int num = rnd.Next(minimum, maximum);
      Console.WriteLine($"Le nombre aléatoire choisi est: {num}.");
  }
}

returns following message:

[Running] scriptcs "/home/pc/Codes/C#/random.cs"
/bin/sh: 1: scriptcs: not found

[Done] exited with code=127 in 0.026 seconds

Thanks for your help!

0

There are 0 best solutions below