core icon indicating copy to clipboard operation
core copied to clipboard

HOW TO RUN HELLO WORLD IN VS CODE USING C SHARP

Open snlinfo2 opened this issue 5 years ago • 10 comments

csharp hello world1 image I CAN'T RUN THE CODE IN SCREENSHOT. I NEED HELP - I AM USING VS CODE 2019, WINDOWS10 ON SURFACE PRO4 Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/create Operating System: windows

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

snlinfo2 avatar Apr 03 '21 19:04 snlinfo2

Press f5?

knilecrack avatar Apr 03 '21 20:04 knilecrack

Press f5?

SEE THE ERROR MESSAGE POPUP VSCODE HELLO WORLD CODE RUN ERROR1

snlinfo2 avatar Apr 05 '21 03:04 snlinfo2

Looks to me as a configuration error; tagging @filipw for help triaging it.

jozkee avatar Apr 05 '21 19:04 jozkee

What happens if you run from the command-line like we show in the tutorial without using the VS Code debugger? Just trying to pinpoint the problem.

mairaw avatar Apr 05 '21 19:04 mairaw

Find below what happened when ran of cmd: run hello world in cmd

snlinfo2 avatar Apr 06 '21 21:04 snlinfo2

Thanks. So it's working from the CLI. Thanks for confirming @snlinfo2.

mairaw avatar Apr 06 '21 22:04 mairaw

Can you post configuration from launch.json ?

knilecrack avatar Apr 08 '21 20:04 knilecrack

image

You specified an invalid path for the executable in .vscode/launch.json. You may need to replace them to net5.0 and myApp respectively.

hez2010 avatar May 17 '21 16:05 hez2010

@snlinfo2 can you please paste the contents from your .vscode/launch.json file?

mairaw avatar Jun 03 '21 19:06 mairaw

This issue has been automatically closed due to no response from the original author. Please feel free to reopen it if you have more information that can help us investigate the issue further.

no-response[bot] avatar Jun 10 '21 20:06 no-response[bot]