<分区>
我已经创建了 Windows 服务,它在 Windows 操作系统上运行良好,但我们需要在 Linux 或 Mac 操作系统上运行同样的服务。
有可能吗?
<分区>
我已经创建了 Windows 服务,它在 Windows 操作系统上运行良好,但我们需要在 Linux 或 Mac 操作系统上运行同样的服务。
有可能吗?
最佳答案
Linux 或 macOS 有自己的方式来管理“服务”,通过 systemd
或 supervisor
或其他机制。因此,您将无法将 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>
python - 允许输入 Unicode 转义作为命令行参数