关于"'System.ServiceProcess.ServiceBase' 没有被指定"的错误的解决方法

错误内容:

The type 'System.ServiceProcess.ServiceBase' is defined in an assembly that is not referenced.

You must add a reference to assembly 'System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

解决方法:

这是由于没有添加服务引用的关系,请添加对System.ServiceProcess对象的引用即可.

原文地址:https://www.cnblogs.com/scy251147/p/2349541.html