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