During this time, I have been writing Windows service. Every time I write and debug, I enter a command on the console to install, start, and uninstall Windows service,
Although the workload is not large, it is troublesome for a long time. So I installed a Windows service using. net.
First, create a project for installation and deployment in the solution, right-click the project name, and choose [add] --> [project output] from the menu.
In the displayed "add project output group" window, the first drop-down box lists other projects in the solution,
Select the Windows Service Project to be installed, select the primary output, and click [OK].
I thought this would work, but after the installation, Windows service is not installed as a service.
You must also add custom operations to the installation project. Right-click the installation project and choose View> Custom operation.
For example, add custom operations separately. In the application folder, select the primary output you just added.