Working with TopShelf, I'm running into an error around "Topshelf.HostConfigurators.WindowsServiceDescription service has not been installed yet."
Asked Answered
L

2

1

Has anyone had experience with TopShelf when building Windows Services?

I keep running into this error when trying to start the service,

"Topshelf.HostConfigurators.WindowsServiceDescription service has not been installed yet."

The build, installer, installation, and all those steps are completed and the service appears in the services list in Windows Server, yet when I click on the service and attempt to start it, this exception is thrown. The full error message is shown below.

INFO 10:23:08 Starting up as a winservice application FATAL 10:23:08 The Topshelf.HostConfigurators.WindowsServiceDescription service has not been installed yet. Please run 'RIS.ModelGenerator.Scheduler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null install'. ERROR 10:23:08 The service exited abnormally with an exception Topshelf.Exceptions.ConfigurationException: The Topshelf.HostConfigurators.WindowsServiceDescription service has not been installed yet. Please run 'RIS.ModelGenerator.Scheduler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null install'. at Topshelf.Windows.WindowsServiceHost.Run() in d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\OS\Windows\WindowsServiceHost.cs:line 56 at Topshelf.HostFactory.Run(Action`1 configure) in d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\Config\HostFactory.cs:line 45

Larcener answered 8/9, 2011 at 17:15 Comment(0)
L
0

It appears, that I had a version that just doesn't really work (which appears to be the latest version). I had to roll back (via NuGet thanksfully) to a previous version, pre v2.0 in order to resolve my issue. It also appeared that the project I was working on was hooked into some pre v2.0 features/methods, thus the ensuing problem.

Thanks to Jeff Schumacher for the extra assist on this problem. Hopefully the TopShelf software is updated to not have these disparities in current versions.

Larcener answered 2/10, 2011 at 17:50 Comment(0)
T
6

The problem is most likely that you have spaces in your service name. For whatever reason, Topshelf 2.2.2.0 does properly search for services with a space in the name, even though the service may be installed with a space, i.e. "My Service". When TopShelf searches for the service to check if it's installed, it will only look for "My".

Here's a snippet you can use to view the services installed on your box:

using System;
using System.Linq;

public class Foo
{
    public static void Main()
    {
        foreach(var x in System.ServiceProcess.ServiceController.GetServices().OrderBy(x => x.ServiceName))
        {
            Console.WriteLine("Service Name: '{0}';, Display Name: '{1}'", x.ServiceName, x.DisplayName);
        }

        Console.ReadKey();
    }
}
Tung answered 7/10, 2011 at 20:27 Comment(0)
L
0

It appears, that I had a version that just doesn't really work (which appears to be the latest version). I had to roll back (via NuGet thanksfully) to a previous version, pre v2.0 in order to resolve my issue. It also appeared that the project I was working on was hooked into some pre v2.0 features/methods, thus the ensuing problem.

Thanks to Jeff Schumacher for the extra assist on this problem. Hopefully the TopShelf software is updated to not have these disparities in current versions.

Larcener answered 2/10, 2011 at 17:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.