C
C#•3mo 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•3mo ago
Why are you trying to use scriptcs? Just dotnet run the project
Jimmacle
Jimmacle•3mo 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
zehraOP•3mo ago
yes I have already run dotnet run in my terminal but did not worked
Angius
Angius•3mo ago
Elaborate "did not worked" is about the equivalent of "me no feel good" in doctor's office
zehra
zehraOP•3mo ago
No description
zehra
zehraOP•3mo ago
I need to work environment to make practice for C#
Angius
Angius•3mo ago
Run it from the directory of your csproj or do what the error message tells you to
zehra
zehraOP•3mo ago
I am used to use IntelliJ for IDE
Angius
Angius•3mo ago
Use Rider, then
Jimmacle
Jimmacle•3mo ago
you need to run dotnet run in the same folder as your csproj
Buddy
Buddy•3mo ago
Usually it's Brackeys "tutorial" or some other youtuber
zehra
zehraOP•3mo ago
I want to change directory but it did not work , what can be the reason ?
No description
Buddy
Buddy•3mo 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
zehraOP•3mo 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•3mo ago
are you sure that you don't have Test/Test?
zehra
zehraOP•3mo ago
ahhh I see😢
zehra
zehraOP•3mo ago
thank you very much indeed
No description
zehra
zehraOP•3mo ago
I have run
No description
zehra
zehraOP•3mo ago
it worked but When I click run button at the top right corner VS code
zehra
zehraOP•3mo ago
I have still same error message
No description
Angius
Angius•3mo ago
Welcome to the VS Code experience
zehra
zehraOP•3mo ago
at least I am running in the terminal but VS code run button is not working
Angius
Angius•3mo 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
zehraOP•3mo ago
how I can do this?
Angius
Angius•3mo ago
¯\_(ツ)_/¯
zehra
zehraOP•3mo ago
yes , is this location right?
Angius
Angius•3mo 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
zehraOP•3mo ago
thank you very much for all explanation
Angius
Angius•3mo 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
zehraOP•3mo 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•3mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX•3mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Angius
Angius•3mo 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•3mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server