title: Startup.cs in a self-hosted .NET Core Console Application
body: <p>I have a self-hosted <strong>.NET Core Console Application</strong>.</p>
  <p>The web shows examples for <em>ASP.NET Core</em> but I do not have a web server. Just a simple command line application.</p>
  <p>Is it possible to do something like this for console applications?</p>
  <pre><code>public static void Main(string[] args)
  {
      // I don't want a WebHostBuilder. Just a command line
  
      var host = new WebHostBuilder()
          .UseKestrel()
          .UseContentRoot(Directory.GetCurrentDirectory())
          .UseIISIntegration()
          .UseStartup&lt;Startup&gt;()
          .Build();
  
      host.Run();
  }
  </code></pre>
  <p>I would like to use a Startup.cs like in ASP.NET Core but on console.</p>
  <p>How do I to this?</p>