Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a .NET console application in the background

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?

like image 802
etoisarobot Avatar asked Apr 21 '10 20:04

etoisarobot


People also ask

How do I run a .NET application 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.

How do I run a .NET core console application on Windows?

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.


1 Answers

Project > Properties> Application tab > change Output type to "Windows application".

No more console window.

like image 71
Hans Passant Avatar answered Oct 09 '22 14:10

Hans Passant