title: Why my C# does not have System.ServiceProcess Library?
body: <p>This is the code. I just wanna test the library of System.ServiceProcess library.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.ServiceProcess;
  
  namespace ConsoleApplication1
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("hi");
              var srv = new ServiceController("MyService");
              Console.WriteLine("MyService Status {0}", srv.Status);
              if (srv.Status != ServiceControllerStatus.Running)
                  srv.Start();
              System.Threading.Thread.Sleep(1000000);
          }
      }
  }
  </code></pre>
  
  <p>However, when I run the C# code, its says:</p>
  
  <blockquote>
    <p>Error 1   The type or namespace name 'ServiceProcess' does not exist in
    the namespace 'System' (are you missing an assembly reference?)</p>
  </blockquote>
  
  <p>What went wrong?</p>