C
C#•4w ago
zehra

✅ Command Not Found error

I have created console app, I want to run hello word but some reason I am having this error although I have add C# Dev Kit extention , What can be the reason?
No description
34 Replies
Angius
Angius•4w ago
Why are you trying to use scriptcs? Just dotnet run the project
Jimmacle
Jimmacle•4w ago
this isn't the first time i've seen this, so i suspect there's a vscode extension or some other material that shows up when googling that directs people to try this
zehra
zehra•4w ago
yes I have already run dotnet run in my terminal but did not worked
Angius
Angius•4w ago
Elaborate "did not worked" is about the equivalent of "me no feel good" in doctor's office
zehra
zehra•4w ago
No description
zehra
zehra•4w ago
I need to work environment to make practice for C#
Angius
Angius•4w ago
Run it from the directory of your csproj or do what the error message tells you to
zehra
zehra•4w ago
I am used to use IntelliJ for IDE
Angius
Angius•4w ago
Use Rider, then
Jimmacle
Jimmacle•4w ago
you need to run dotnet run in the same folder as your csproj
Buddy
Buddy•4w ago
Usually it's Brackeys "tutorial" or some other youtuber
zehra
zehra•4w ago
I want to change directory but it did not work , what can be the reason ?
No description
Buddy
Buddy•4w ago
you cant change directory to a file use tab for auto-complete (depends on the terminal) you can do code ./ if you're already in the directory that contains the .sln or .csproj in the terminal that'll start VSCode in the relative directory
zehra
zehra•4w ago
I am already in the directory which is Test that contains the .sln or .csproj when I run dotnet run still not working
No description
Jimmacle
Jimmacle•4w ago
are you sure that you don't have Test/Test?
zehra
zehra•4w ago
ahhh I see😢
zehra
zehra•4w ago
thank you very much indeed
No description
zehra
zehra•4w ago
I have run
No description
zehra
zehra•4w ago
it worked but When I click run button at the top right corner VS code
zehra
zehra•4w ago
I have still same error message
No description
Angius
Angius•4w ago
Welcome to the VS Code experience
zehra
zehra•4w ago
at least I am running in the terminal but VS code run button is not working
Angius
Angius•4w ago
You probably need to edit some file in .vscode directory to tell VSC to use dotnet run and not scriptcs Also, I see you moved the .sln file
zehra
zehra•4w ago
how I can do this?
Angius
Angius•4w ago
¯\_(ツ)_/¯
zehra
zehra•4w ago
yes , is this location right?
Angius
Angius•4w ago
The structure, usually, is
MyProject
|— MyProject
| |— MyProject.csproj
| |— Program.cs
|— MyProject.sln
MyProject
|— MyProject
| |— MyProject.csproj
| |— Program.cs
|— MyProject.sln
not
MyProject
|— MyProject
| |— MyProject.csproj
| |— Program.cs
| |— MyProject.sln
MyProject
|— MyProject
| |— MyProject.csproj
| |— Program.cs
| |— MyProject.sln
zehra
zehra•4w ago
thank you very much for all explanation
Angius
Angius•4w ago
Or, since you just have a single hello world project, ditch the solution altogether
mkdir CoolStuff
cd CoolStuff
dotnet new console
code .
mkdir CoolStuff
cd CoolStuff
dotnet new console
code .
The bare minimum Also, since you mentioned you're used to IntelliJ IDEs, why not use Rider instead of VSC?
zehra
zehra•4w ago
Okay I have just got it , Rider is one of the IDE , thanks for the suggestion I will take a look Thank you
Unknown User
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX•4w ago
If you have no further questions, please use /close to mark the forum thread as answered
Angius
Angius•4w ago
The fact that it does require setup that you can fuck up this badly, kinda is VSC fault tbh If not VSC's, then DevKit's I'd expect it to set up everything
Unknown User
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server