.NET 程序集未使用 System.Process 创建为后台进程

发布于 2024-09-08 07:51:45 字数 216 浏览 2 评论 0原文

我正在尝试使用 System.Diagnostic.Process API 启动后台进程。它启动所有本机和 Windows 窗体基本进程,例如 notepad.exe,但这无法启动纯托管的无 GUI 程序集。任务管理器不会将其列表中列出的那些程序集显示为单独的进程,并且不会出现异常或错误代码。

对于任务管理器中可见的纯托管程序集,是否有其他方法可以使用 Process.Start 按需启动后台进程?

I am trying to launch background processes using System.Diagnostic.Process API. It launches every all native and windows form base processes such as notepad.exe, but this is unable to launch pure managed GUI-less assemblies. Task Manager is not showing those assemblies listed in its list as seperate processes, and neither exceptions nor error codes occur.

Is there any other way to launch background processes on demand using Process.Start for pure managed assemblies visible in task manager?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

记忆之渊 2024-09-15 07:51:45

使用任务管理器的“进程”选项卡,而不是“应用程序”选项卡。后一个仅列出具有窗口的进程。还要考虑到该进程在启动后很快就退出了。

Use Task Manager's Processes tab, not the Applications tab. The latter one only lists processes that have a window. Also consider that the process simply exited quickly after starting it.

嘿看小鸭子会跑 2024-09-15 07:51:45

如果您正在使用托管程序集,则应查看 BackgroundWorker

If you are working with a managed assembly, you should check out the BackgroundWorker class

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文