Installed Microsoft Service with success, but doesn't see on service list

2.3k Views Asked by At

i need an help. I follow this tutorial to install microsoft service, with success, but I don't see in the service list.

My service:

public partial class Service1 : ServiceBase
{
    public Service1()
    {
        InitializeComponent();
    }

    protected override void OnStart(string[] args)
    {

    }

    protected override void OnStop()
    {

    }
}

There's is other mode to install a service ? Or i'm wrong somethink ?

my response from developer command tools:

Beginning the Install phase of the installation. See the contents of the log file for the C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe assembly's progress. The file is located at C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.InstallLog. Installing assembly 'C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe'. Affected parameters are: logtoconsole = assemblypath = C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe logfile = C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.InstallLog No public installers with the RunInstallerAttribute.Yes attribute could be found in the C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe assembly.

The Install phase completed successfully, and the Commit phase is beginning. See the contents of the log file for the C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe assembly's progress. The file is located at C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.InstallLog. Committing assembly 'C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe'. Affected parameters are: logtoconsole = assemblypath = C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe logfile = C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.InstallLog No public installers with the RunInstallerAttribute.Yes attribute could be found in the C:\projects\SimPortalService\SimPortalService\bin\Debug\SimPortalService.exe assembly. Remove InstallState file because there are no installers.

The Commit phase completed successfully.

The transacted install has completed.

1

There are 1 best solutions below

1
On BEST ANSWER

You have skipped an important step from the article:

In order to use the steps in this article, you first need to add a service installer to your Windows Service. See Walkthrough: Creating a Windows Service Application in the Component Designer.

Your service doesn't have an installer, so installutil has no work to do as it reports:

No public installers with the RunInstallerAttribute.Yes attribute could be found

So, create an installer for your service.