我有一个控制台应用程序,用于通过 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模板网!
读取 XML 时忽略空格Ignore whitespace while reading XML(读取 XML 时忽略空格)
带有检查空元素的 XML 到 LINQXML to LINQ with Checking Null Elements(带有检查空元素的 XML 到 LINQ)
在 C# 中读取带有未闭合标签的 XMLReading XML with unclosed tags in C#(在 C# 中读取带有未闭合标签的 XML)
在 C# 中使用 Html 敏捷性解析表格、单元格Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、单元格)
使用 LINQ 从 xml 中删除元素delete element from xml using LINQ(使用 LINQ 从 xml 中删除元素)
解析格式错误的 XMLParse malformed XML(解析格式错误的 XML)