Problem with ServiceProcess.ServiceController

Posted on 2006-03-19
Last Modified: 2010-04-23
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.
Question by:DCreature
    LVL 6

    Accepted Solution

    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
    LVL 6

    Expert Comment

    If this doesn't help, post your code and I will have a look.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now