Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output for the simple hello world console app #7917

Closed
liaoyd16 opened this issue Nov 1, 2022 · 8 comments
Closed

No output for the simple hello world console app #7917

liaoyd16 opened this issue Nov 1, 2022 · 8 comments
Labels
area-tutorials Issues related to getting started tutorials needs-more-info Not enough information has been provided. Please share more detail as requested. Stale

Comments

@liaoyd16
Copy link

liaoyd16 commented Nov 1, 2022

Problem encountered on https://dotnet.microsoft.com/en-us/learn/dotnet/hello-world-tutorial/run
Operating System: ubuntu 20.04

Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

terminal command:

dotnet new console -o MyApp -f net6.0
dotnet run

code:

// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

terminal output: no output
expected output: print "hello world"

@mairaw mairaw added needs-more-info Not enough information has been provided. Please share more detail as requested. area-tutorials Issues related to getting started tutorials labels Nov 2, 2022
@mairaw
Copy link
Contributor

mairaw commented Nov 2, 2022

Did you get any error message? Can you share a screenshot of what happened?

@SoundedSquash
Copy link

You need to be in the new project's folder before running. With your first command of dotnet new, you're setting a name of MyApp which creates a folder MyApp to put things in.

cd MyApp
then
dotnet run

This is documented as the 2nd step on the Create your app page.

@liaoyd16
Copy link
Author

liaoyd16 commented Nov 4, 2022

I did execute dotnet run in MyApp/. I found similar case in dotnet/sdk#23616, where dotnet ./bin/Debug/net5.0/MyApp.dll could work.

@github-actions
Copy link

This issue is stale because there has been no response to a request for more information for 7 days.

@github-actions github-actions bot added the Stale label Nov 11, 2022
@31ank
Copy link

31ank commented Nov 11, 2022

did you find a solution? Having the same problem...
I have an application that worked last week but when I tried to start it today with dotnet run I don't have an output. Same behavior if I try to debug it with vscode
Running Ubuntu 20.04.5
dotnet --version: 6.0.403

Creating a new console application with dotnet new console and trying to run it also doesn't work

@github-actions github-actions bot removed the Stale label Nov 11, 2022
@github-actions
Copy link

This issue is stale because there has been no response to a request for more information for 7 days.

@github-actions github-actions bot added the Stale label Nov 18, 2022
@github-actions
Copy link

This issue was closed because there was no response to a request for more information for 10 days.

@crizmo
Copy link

crizmo commented Nov 29, 2022

did you find a solution? Having the same problem... I have an application that worked last week but when I tried to start it today with dotnet run I don't have an output. Same behavior if I try to debug it with vscode Running Ubuntu 20.04.5 dotnet --version: 6.0.403

Creating a new console application with dotnet new console and trying to run it also doesn't work

Facing the same issue , Running dotnet run simply doesnt display any output in the terminal .
Have you found out any solution for it

[ EDIT ]
Found out why it was not running
I installed the sdk using snap which when installing was version 6
but i downloaded .NET Core v 7. Removing it from snap and installing from Microsoft has fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tutorials Issues related to getting started tutorials needs-more-info Not enough information has been provided. Please share more detail as requested. Stale
Projects
None yet
Development

No branches or pull requests

5 participants