简体   繁体   English

添加安装程序说服务名称包含无效字符,为空或太长

[英]Add installer says Service name contains invalid characters, is empty, or is too long

I've created a service, when I right click and press create installer, I get the above error message. 我创建了一项服务,当我右键单击并按下创建安装程序时,我收到上述错误消息。

The service name is not missing and is valid. 服务名称不会丢失且有效。

The problem is probably in that I have a base class on my service, with a couple of properties and an empty constructor. 问题可能在于我的服务上有一个基类,有几个属性和一个空构造函数。

Basically looks like this: 基本上看起来像这样:

EmailService : MyService

MyService : ServiceBase

The EmailService is a partial class, and the constructor calls InitializeComponent(); EmailService是一个部分类,构造函数调用InitializeComponent(); in the designer, which sets the servicename. 在设计师,设置servicename。

I am guessing I've done something silly regarding my base class that's breaking it or confusing it. 我猜我已经为我的基类做了一些愚蠢的事情,它正在破坏它或使它混淆。 Any ideas? 有任何想法吗?

Is the name set programmatically only? 名称是否仅以编程方式设置? This is not recognized by the system. 系统无法识别。 Right-click your service in design view, click Properties and make sure ServiceName is set. 在设计视图中右键单击您的服务,单击“ Properties并确保已设置ServiceName

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows 服务安装程序 - 服务名称包含无效字符、为空或太长 - Windows Service Installer - Service name contains invalid characters, is empty, or is too long 错误:确保它不包含无效字符或标点符号并且它不会太长 - ERROR:Make sure that it does not include invalid characters or punctuation and that it is not too long 具有不同名称的服务安装程序 - Service installer with a different name Microsoft.Azure.StorageException:指定的资源名称包含无效字符 - Microsoft.Azure.StorageException: The specified resource name contains invalid characters Azure CloudFile - “指定的资源名称包含无效字符。” - Azure CloudFile - “The specifed resource name contains invalid characters.” 文件路径包含无效字符 - Filepath contains invalid characters 指定的资源名称包含无效字符 为 blob 生成 SAS url 时出错,即使 blob 名称有效 - The specified resource name contains invalid characters Error generating SAS url for blob even though blob name is valid 创建安装程序,错误文件夹路径'。'包含无效字符 - Creating an installer, error The Folder path '.' contains an invalid character 无效的 URI:Uri 字符串太长 HttpGET - Invalid URI: The Uri string is too long HttpGET 无效的 URI:Uri 字符串太长 - Invalid URI: The Uri string is too long
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM