How does Topshelf differ from a ASP.NET Core Worker Service? and what are the pros and cons of each of them and are they both support Windows and Linux?
Topshelf is available in .net standard and that means you can use it in .net core apps. That doesn't mean that you can run in on Linux because it is dependent on Windows registry. In the Topshelf docs you can see that it runs on Windows only.
On the other hand, worker services run on .net core 3 and they can run on both Linux and Windows.
So if you have .net framework or .net core 2 or 1 project go ahead with Topshelf and if you have .net core 3 project go ahead with worker service.
TopShelf = .NET Framework
Worker Service = .NET Core
There are even articles around how to migrate from TopShelf to Worker Service
Topshelf works with Mono, making it possible to deploy services to Linux. The service installation features are currently Windows only, but others are working on creating native host environment support so that installation and management features are available as well. According to its docs
© 2022 - 2024 — McMap. All rights reserved.