The term 'csc' is not recognized as the name of a cmdlet, etc. (New to C#. Learning from 'C#8.0 and .NET Core 3.0)

1k Views Asked by At

Very new to programming here. I am going through 'C# 8.0 and .NET Core 3.0 book'. I tried to check which versions of the C# compiler are available, but the term 'csc' isn't recognized. I have installed C# to Visual Studio Code and played with this a little, but I am new, so figure now is a good time to ask questions. Any tips would be appreciated. Screenshot of terminal showing that 'csc' not ok

1

There are 1 best solutions below

3
AudioBubble On BEST ANSWER
  1. Locate the path of csc.exe and add it your PATH environment variable. Probably C:\Windows\Microsoft.NET\Framework64\v4.0.30319. There will be csc.exe for all versions like v2.0.XXXXX and v3.5. Select the one with the highest version in Framework64/Framework directory depending on your requirement.

  2. Copy the path of csc.exe and add it to the PATH system environment variable.

  3. Quit the CMD, and then launch again and run the program