本文介绍了使用 TopShelf 时,我遇到了关于“尚未安装 Topshelf.HostConfigurators.WindowsServiceDescription 服务"的错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人在构建 Windows 服务时使用过 TopShelf?

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 服务."

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

构建、安装程序、安装和所有这些步骤都已完成,该服务出现在 Windows Server 的服务列表中,但是当我单击该服务并尝试启动它时,会引发此异常.完整的错误消息如下所示.

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 作为 winservice 应用程序启动FATAL 10:23:08 尚未安装 Topshelf.HostConfigurators.WindowsServiceDescription 服务.请运行RIS.ModelGenerator.Scheduler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null install".ERROR 10:23:08 服务异常退出异常Topshelf.Exceptions.ConfigurationException:尚未安装 Topshelf.HostConfigurators.WindowsServiceDescription 服务.请运行RIS.ModelGenerator.Scheduler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null install".在 d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\OS\Windows\WindowsServiceHost.cs:line 56 中的 Topshelf.Windows.WindowsServiceHost.Run()在 d:\BuildAgent-01\work\799c08e77fef999d\src\Topshelf\Config\HostFactory.cs:line 45

INFO 10:23:08 Starting up as a winservice applicationFATAL 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 exceptionTopshelf.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

推荐答案

看来,我有一个不能真正工作的版本(似乎是最新版本).为了解决我的问题,我不得不回滚(谢天谢地通过 NuGet)到 v2.0 之前的以前的版本.似乎我正在从事的项目与一些 v2.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.

感谢 Jeff Schumacher 对这个问题的额外帮助.希望 TopShelf 软件更新后不会在当前版本中出现这些差异.

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.

这篇关于使用 TopShelf 时,我遇到了关于“尚未安装 Topshelf.HostConfigurators.WindowsServiceDescription 服务"的错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 20:46