Figure 3. Add the ServiceProcess.dll Reference.
In order to communicate with Windows Service class objects and properties, you must create a reference to the ServiceProcess.dll component explicitly for any project that needs access to the System.ServiceProcess namespace.