title: Windows Service without Visual Studio interference
body: <p>I'd like to create and manage a Windows Service application without "help" from Visual Studio's designer.  </p>
  
  <p>Since this is .NET, and judging by MSDN and what the designer does, this means inheriting from <code>Installer</code>, and constructing and dealing with <code>ServiceProcessInstaller</code> and <code>ServiceInstaller</code> to be able to manage the install-time execution of the serivce.</p>
  
  <p>Runtime, this means creating a <code>ServiceBase</code> subclass and starting it from <code>Main</code> using <code>ServiceBase.Run</code> (and overriding various <code>ServiceBase</code> event handling methods).</p>
  
  <p>However, when I do this, Visual studio insists on treating the <code>Installer</code> and <code>ServiceBase</code> subclasses as designer-edited files.  This doesn't exactly help readability, not to mention the fact that it generally can't deal with handwritten code at all.  <strong>I'd like to avoid the designer</strong> to keep things manageable (to avoid nebulous who-knows-what-runs-when, particularly for code that's tricky to test and debug such as windows services that after all <em>must</em> be installed to be run at all), and also to be able to specify the service name at run-time, rather than at compile time - the designer doesn't support that.</p>
  
  <p>How can I create a windows service application without all the gunk?</p>