Installing a Topshelf application as a Windows service

Brendan Reynolds picture Brendan Reynolds · Aug 13, 2013 · Viewed 59.5k times · Source

Using Visual Studio Express 2012, I've created a console application using Topshelf (Version 3.1.107.0). The application works as a console application, but I can't figure out how to install it as a service. I've published the project from within Visual Studio (Build, Publish), started a command prompt as Administrator, navigated to the folder where the application was published, and run setup.exe -install from the command prompt. The application is installed and runs, but as a console application, not a Windows service. What am I missing here?

For those who may not be familiar with Topshelf, it is a Windows Service framework for .Net and is supposed to facilitate the scenario I describe above - develop and debug as a console application, deploy as a Windows Service. See the documentation at http://docs.topshelf-project.com/en/latest/index.html.

Answer

Travis picture Travis · Aug 13, 2013

Run your service.exe install to install the service.

See the Topshelf Command Line Reference documentation for more information.