.net - 在 .net 中设置 Windows 服务描述的最佳方法是什么

标签 .net windows

我已经使用 VS2005 模板创建了一个 C# 服务。它工作正常,但该服务的描述在 Windows 服务控制小程序中是空白的。

最佳答案

创建ServiceInstaller并设置描述

private System.ServiceProcess.ServiceInstaller serviceInstaller = 
  new System.ServiceProcess.ServiceInstaller();
this.serviceInstaller.Description = "Handles Service Stuff";

关于.net - 在 .net 中设置 Windows 服务描述的最佳方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/485268/

相关文章:

c# - EF Core 多个 HTTP 请求抛出错误

c# - 进程间通信能否像进程内事件一样快(使用wcf和c#)

c# - 检查 Windows 窗体滚动条是否一直向下滚动?

c - 输出数量大于应有的数量 - gcc 编译

windows - 使用netcat时如何根据请求有条件响应

windows - 以管理员身份运行批处理(自动提升),然后取消提升

Windows - 防止崩溃 "Checking for a solution..."和 "Restarting the program..."

android - Google Android 会支持 .NET 吗?

c++ - 命名空间 'cmb1' 导致 C++ 编译错误

c# - Linq 从两个列表中返回所有元素对?