Why a console application?

179 views
Skip to first unread message

Fredrik Arvidsson

unread,
Jul 18, 2017, 4:36:20 AM7/18/17
to topshelf-discuss
I've been fiddling around a bit with Topshelf now for some time, and everytime the same question comes up: 

- Why a console application?

Why can it not host a Windows Application? By using the Windows Application output type there is not necessary an output window gui, or you can atleast not assume there is, which also makes sense, since all you should know is that it is an Windows Application. 

By using a Windows Application output it would also be possible to create integration tests that includes the Topshelf hosting code.

So again, Why a console application?


Finnaly, thanks for an otherwise nice little hosting tool. Keep up the good work!

Andrew Kelly

unread,
Oct 25, 2017, 9:12:41 AM10/25/17
to topshelf-discuss
Yeah I have a windows application that runs in a custom "service loop" when passed parameter SERVICE. Otherwise it opens a windows form to run specific functions of the application. I want this windows application to work with Topshelf without re-coding it as a console app. I assumed technically since this Windows Application can be run also from the command line Topshelf would work with it. I am still wrapping my head around Topshelf so not got there yet. I need it to work with custom program parameters. But from what I can tell once you wrap the app with Topshelf you can only pass the Topshelf options like Start, Stop etc. 

Based on lack of response to your July post I am wasting my time asking questions on this group. 

Fredrik Arvidsson

unread,
Oct 25, 2017, 10:39:06 AM10/25/17
to topshelf-discuss
I actually created a little extension that makes it possible to host what ever application with topshelf. You'll find it here: https://github.com/Fresa/Topshelf.ApplicationHostBuilder
Reply all
Reply to author
Forward
0 new messages