Are there other reasons for choosing Topshelf than ease of debugging console applications? [closed]

StackOverflow https://stackoverflow.com/questions/20068431

  •  31-07-2022
  •  | 
  •  

Question

We have a bunch of Windows services and I was thinking of TopShelf as a way to host them all in a single process. This was supported by Topshelf but I read that starting from version 3.0 Topshelf will no longer support hosting of multiples services in a single container.

So what is then an advantage of Topshelf vs. creation of Windows Service using Visual Studio C# template? Topshelf gives me a console app that I can use for debugging, but if I never have such needs (all our services have just few lines of code calling business logic components, and components are properly unit tested), does Topshelf give any other advantages?

Was it helpful?

Solution

Topshelf is useful for building and deploying Windows services. It is easy to build the services, installation is just servicename install, and easy to debug. In reality, you don't NEED any of these things. But if it saves some effort, it might be worth using.

Topshelf 3.0 removed the 'shelving' component because one cannot monitor individual services inside a single host easily. If you don't have that visibility into what's going on via normal monitoring then it's not terribly useful.

OTHER TIPS

for easily debugging windows service, try James Michael Hare's debuggable/installable windows service

http://geekswithblogs.net/BlackRabbitCoder/archive/2011/03/01/c-toolbox-debug-able-self-installable-windows-service-template-redux.aspx

I have used his method in many of windows service programs in my job and it works well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top