0

When using the VS Code extension Code Runner for my C# .NET 6 console app, after hitting the run button, the following command runs in the terminal:

❯ dotnet run "/home/USER/code/c#/MyApp/Program.cs"
Hello, World!
~/code/c#/MyApp ❯

I am wondering how to remove the file path after 'dotnet run'. Given that I am already in the console application directory, I would like for the extension to only execute the 'dotnet run' command, which would achieve the same result. I can demonstrate this by running the command myself without including the file path to the 'Program.cs' file at the end:

❯ dotnet run
Hello, World!
~/code/c#/MyApp ❯

This is purely an aesthetic matter, but it has been bugging me a lot and I've spent more than two hours now trying to figure out a solution for this.

starball
  • 20,030
  • 7
  • 43
  • 238

2 Answers2

1
  1. Press Ctrl (or Cmd) + Shift + P in VSCode
  2. Type settings json
  3. Click on User Settings (JSON)
  4. Add "code-runner.showExecutionMessage": false,

Enjoy

umitu
  • 2,423
  • 1
  • 10
  • 28
C-Sharp
  • 11
  • 2
-1

**- Press ctrl + shift + P in VS Code

  • Type settings.json
  • click on user settings (Json)
  • Add "code-runner.showExecutionMessage": false,**