When I start a Console App (.NET Core) with Ctrl+F5 (Start Without Debugging) in Visual Studio Community 2019 (Version 16.3.1), the following message is appended in the Console window at the end:
C:\HelloWorld\bin\Debug\netcoreapp3.0\HelloWorld.exe (process 1672) exited with code 0.
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Is there any way to prevent Visual Studio 2019 from printing this message? I tried the solution from preventing a similar message from appearing in the Output Window, by changing the option: Tools > Options > Debugging > Output Window > Process Exit Messages = Off, but it has no effect in the Console Window.
Note: this message is not shown in Visual Studio 2017. It is only shown in Visual Studio 2019, and only on .NET Core apps.
You can disable it by checking the Tools > Options > Debugging > General > Automatically close the console when debugging stops
option:
As stated by the console itself (Visual Studio 2019 v16.3.2):
That will make the console just print Press any key to continue...
by starting without debugging (CTRL
+ F5
) and not the exit code (still leaves the console open):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With