❔ ✅ Error -> scriptcs : The term 'scriptcs' is not recognized as the name of a cmdlet, function...
Getting this error: scriptcs : The term 'scriptcs' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
40 Replies
Im very new to C#
http://scriptcs.net/
It is deprecated
and should not be used
huh?
You need a program
how do i change this?
$vscode
1) Install the C# extension
2)
2.a) DO NOT USE OPEN FILE
2.b) Always use
Open Folder
(from the File
menu), and open the folder containing your sln file (or the folder containing the csproj
if you have only one csproj
)
3) To make the extension start and detect C#, either:
3.a) wait for the prompt that will appear on the bottom right of your screen that ask you if you want it to create some files, and say Yes
3.b) Command Palette (F1
or Ctrl+Shift+P
) and type > .Net : Generate Assets for build and run
4) you should see a flame on the Status
bar with the Omnisharp logo (see second attached screenshot)
5) it should load to finally say OmniSharp server is running (if not ask for help)
https://media.discordapp.net/attachments/569261465463160900/1006652191689429022/unknown.png
https://cdn.discordapp.com/attachments/569261465463160900/951015732769079336/unknown.pngif you want to run C#, follow those steps instead
do not use scriptcs
oh
ok thanks
As C# is not like Python, you can't simply create a file and you're good to go.
You need a project.
oh
Great.
It is a project because you have
.csproj
file thereah ok
I would not recommend using VSCode as a beginner, it is a lot of manual work.
I would recommend Visual Studio Community if you're on Windows and Rider if you're on Mac / Linux.
it looks nice
VSCode looks nice, sure. But honestly terrible for C#
thats the reason i use it
oh
Rider also looks nice, but it is premium.
im on windows
It is cross-platform, which means it is available on Mac, Linux and Windows.
ah
i just ran my code, but the same error keeps on appearing
Follow the steps
ive followed all the steps, i see the flame logo, im using .NET but i still get the error
You're literally trying to run scriptcs which is not installed, and should not be installed.
Press that
ohh it worked
thank you
Anytime.
But again, I would not recommend VSCode for beginners. As there is a lot of manual work.
You have to know dotnet CLI.
https://learn.microsoft.com/en-us/dotnet/core/tools/
as in learn it?
ah
Yes
What commands to run, etc.
ah ok
editing csproj, and so on
thanks for everything
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.