Question I cannot run console project .net hello word

tivanvodich

New member
Joined
Dec 27, 2023
Messages
3
Programming Experience
Beginner
Hi all, I am a beginner of .net, I try to create new project hello word and run this project, But Nothing show in terminal when I run project
Screenshot 2023-12-28 at 11.22.12 AM.png
 
Moving from .NET Framework forum to .NET Core forum since it looks like you are trying to run on a non-Windows machine, and .NET Framework doesn't work an non-Windows machine. Ideally, we would also have a VS Code sub-forum rather than bundled everything under Visual Studio, but alas.

Hopefully someone who uses VS Code extensively for C# development can comment. I don't know if running the program from within VS Code will pop open a new terminal window run and then close the window quickly, or if the output will go into VS Code's terminal pane.

What happens if in your terminal pane, you `cd` into the bin directory where your code is compiled to and run the program? Do you see "Hello World" in the terminal pane?
 
I created a project and then entered dotnet run in the terminal and it ran. Try that.

What did you use to create the project? I used dotnet new console -o hello.

There are very many courses in Training. You can find beginner-level courses about C# programming using Visual Studio Code.

I recommend using Visual Studio, not Visual Studio Code. The abundant features in Visual Studio can make it intimidating but it can also make things easier for beginners. In Visual Studio, you can use the GUI to create the project then just use F5 or Ctrl-F5 to run it.
 
I don't think there is Visual Studio for Linux. I don't know the current situation of Visual Studio for Mac. I am guessing the OP is not on Windows because of the different window chrome in their screenshot.
 
I don't think there is Visual Studio for Linux. I don't know the current situation of Visual Studio for Linux I am guessing the OP is not on Windows because of the different window chrome in their screenshot.

Correct, there is not a Visual Studio for Linux. I also do not know what the current status is of Visual Studio for Mac except that Microsoft is discontinuing it.
 
Which brings us full circle to why the OP is trying to use VS Code as their IDE on their non-Windows platform, and how running their program doesn't seem to be showing anything.
 
run project
I do not know what that means. I do not see something executing it.
Which brings us full circle to why the OP is trying to use VS Code as their IDE on their non-Windows platform, and how running their program doesn't seem to be showing anything.

I do not understand what the problem is with using VS Code in Linux. And I do not know what was done to execute the program.
 
Back
Top Bottom