Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing .NET Windows Service

Tags:

c#

.net

I'm trying to install the first service I wrote using:

installutil XMPPMonitor.exe

I get the following message:

Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the E:\Documents\Projects\XMPPMonitor\XMPPMonitor\bin\Debug\XMPPMonitor.exe assembly's progress.
The file is located at E:\Documents\Projects\XMPPMonitor\XMPPMonitor\bin\Debug\XMPPMonitor.InstallLog.

The Install phase completed successfully, and the Commit phase is beginning.
See the contents of the log file for the E:\Documents\Projects\XMPPMonitor\XMPPMonitor\bin\Debug\XMPPMonitor.exe assembly's progress.
The file is located at E:\Documents\Projects\XMPPMonitor\XMPPMonitor\bin\Debug\XMPPMonitor.InstallLog.

The Commit phase completed successfully.


The transacted install has completed.

But I'm not setting the service listed when I run services.msc. Am I missing something?

like image 290
blitzkriegz Avatar asked Feb 28 '23 11:02

blitzkriegz


2 Answers

Make sure you correctly created and configured the ServiceInstaller and ServiceProcessInstaller. These are what installutil uses to actually register each service within the process.

like image 116
Reed Copsey Avatar answered Mar 06 '23 02:03

Reed Copsey


I asked a similar question recently : C#: Running and Debugging a Windows Service

Apparently the problem was because I did not have an Installer attached to the service.

Here is the tutorial I used to add a Service Installer and so on.

like image 39
Andreas Grech Avatar answered Mar 06 '23 02:03

Andreas Grech