How to remove the file path from the Code Runner (VSCode extension) run command for C#?

Viewed 304

When using the VSCode 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.

1 Answers
  1. Go to Vs code setting

  2. Uncheck Show Execution Message option

Related