I have a console application written in C# that is scheduled to run every 15 minutes or so using the built-in Windows Task Scheduler.
Every time it runs, the black console box pops up for the duration of its execution and then closes. I am not writing anything to the console. Is there a way to make this run in the background?
Under your project: Go to Properties > Application Select "Windows Application" as the Output type. This would be the least impact and you can keep your Windows Task Scheduler running the same task. Show activity on this post. Show activity on this post.
You can do it right in Visual Studio. Right click the Console App Project and select Publish. Then change Deployment Mode to Self-contained or Framework dependent. . NET Core 3.0 introduces a Single file deployment which is a single executable.
Project > Properties> Application tab > change Output type to "Windows application".
No more console window.
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