.net 如何在后台运行控制台应用程序(无 UI)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2239151/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to run Console Application in Background (no UI)?
提问by Josh Stodola
Possible Duplicate:
.Net Console Application that Doesn’t Bring up a Console
可能的重复项:
不启动控制台的 .Net 控制台应用程序
I have a console application written in VB.NET that will become a scheduled task on a web server. It will run every ten minutes. The problem is that every ten minutes it displays the empty black CMD window while processing, which can be distracting. How can I configure it to run in the background (with no CMD window displayed)?
我有一个用 VB.NET 编写的控制台应用程序,它将成为 Web 服务器上的计划任务。它将每十分钟运行一次。问题是它在处理时每十分钟显示一个空的黑色 CMD 窗口,这可能会分散注意力。如何将其配置为在后台运行(不显示 CMD 窗口)?
回答by Arthur
Set on your Project in "Application" the Output Type to "Windows Application".
在“应用程序”中的项目上将输出类型设置为“Windows 应用程序”。

