Problem with ServiceProcess.ServiceController

When trying to test (run Debug) my project I get this error:

Error      1      Type 'ServiceProcess.ServiceController' is not defined.      C:\Documents and Settings\TheUser\Local Settings\Application Data\Temporary Projects\WindowsApplication1\Form1.vb      12      27      WindowsApplication1

The application should list services and let a user start and stop them.
LVL 6
DCreatureAsked:
Who is Participating?
 
willbdmanCommented:
Have you added a reference to this class?

on the toolbar go to:-

Project -> Add Reference...

Then scroll down to System.ServiceProcess.dll

Highlight it and then click the Select button in the top right-hand corner. Then click OK at the bottom.

You cold also reference it at the very top of your form code, before any code:-

Imports System.ServiceProcess


Hope this helps
0
 
willbdmanCommented:
If this doesn't help, post your code and I will have a look.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.