Topshelf vs .net core worker service [closed]
Asked Answered
N

3

10

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?

Nunci answered 4/5, 2020 at 10:21 Comment(0)
C
15

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.

Circumstantiality answered 5/5, 2020 at 5:53 Comment(0)
B
3

TopShelf = .NET Framework

Worker Service = .NET Core

There are even articles around how to migrate from TopShelf to Worker Service

Binge answered 4/5, 2020 at 11:45 Comment(3)
tnx, but topshelf support .NETStandard 2.0, doesnt that mean that it can run on .net core environment?Nunci
Yes it could work, but why would you want that when you have support out of the box - both projects are similarBinge
I recommend pulling out your core code from .Net and start using a Worker Service. It's obvious whyMonsour
M
1

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

March answered 15/7, 2021 at 6:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.