c# - 如何在 Linux 或 Mac OS 上运行 Windows 服务

标签 c# linux windows winforms

<分区>

我已经创建了 Windows 服务,它在 Windows 操作系统上运行良好,但我们需要在 Linux 或 Mac 操作系统上运行同样的服务。

有可能吗?

最佳答案

Linux 或 macOS 有自己的方式来管理“服务”,通过 systemdsupervisor 或其他机制。因此,您将无法将 Windows 应用程序运送到此类平台,但您可以基于相同的逻辑编写一个 .NET Core 控制台应用程序,然后将其放在 systemd 或所需的工具下这样的操作系统。

关于c# - 如何在 Linux 或 Mac OS 上运行 Windows 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40690453/

相关文章:

windows - 新版本发布后,我可以使用以前版本的 Azure SDK 多长时间?

c# - 错误 :An unknown error occurred while invoking the service metadata component. 无法生成服务引用

regex - 使用grep搜索find : what is wrong with find .提供的文件 | xargs grep '...' ?

C# 如何将 List<object[]> 转换为 List<customClass>

linux - 如何在linux下用C语言制作图形终端?

python - 允许输入 Unicode 转义作为命令行参数

windows - Windows下如何刷新磁盘读缓存?

java - 无法从 netbeans 运行 tomcat 7

c# - 从后面的 C# 代码打开 HTML 模式弹出窗口

从客户端套接字读取时的C#AsyncSockets递归