.Net Console Application that Doesn#39;t Bring up a Console(不启动控制台的 .Net 控制台应用程序)
问题描述
我有一个控制台应用程序,用于通过 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 控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不启动控制台的 .Net 控制台应用程序


基础教程推荐
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01