我有一个控制台应用程序,用于通过 Windows 调度程序运行计划作业.与应用程序之间的所有通信都在电子邮件、事件记录、数据库日志中.有什么办法可以抑制控制台窗口出现吗?
I have a console application I'm using to run scheduled jobs through windows scheduler. All the communication to/from the application is in email, event logging, database logs. Is there any way I can suppress the console window from coming up?
当然.将其构建为 winforms 应用程序,从不显示您的表单.
Sure. Build it as a winforms app and never show your form.
请小心,因为它不再是真正的控制台应用程序,并且在某些环境中您将无法使用它.
Just be careful, because then it's not really a console app anymore, and there are some environments where you won't be able to use it.
这篇关于不启动控制台的 .Net 控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!