title: Asp.Net Core 2.0-2.2 Kestrel not serving static content
body: <p>When running a Asp.Net Core 2.0 (or 2.2) app using IIS express, static files (css, js) are served as expected.  However when using command line/Kestrel via "dotnet publish -o [targetDirectory]" and dotnet [website.dll], Kestrel does not serve up any static content. Utilizing browser F12, I see Kestrel returns a 404 error. Looking closer, when entering the file path directly in the browser (localhost:5000/<strong>css</strong>/cssfile.css) the file is not displayed but <em>the browser appears to redirect to "localhost:5000/cssfile.css"</em> but still returns a 404 error (note the missing /css/ directory).  </p>
  
  <p>I created this project via Visual Studio 2017, and chose the defaults for a new MVC Core 2.0 application (SDK was installed). </p>
  
  <p>I have followed the steps <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files" rel="noreferrer">here</a> to enable static files in the program.cs and startup.cs files. These implement "app.UseStaticFiles();" and ".UseContentRoot(Directory.GetCurrentDirectory())". None of the articles found via google seem to help. I have verified dotnet copied the static content to the target directory. </p>
  
  <p>What am I missing?  Thanks</p>
  
  <pre><code>// Program.cs
  public static IWebHost BuildWebHost(string[] args) =&gt; WebHost
     .CreateDefaultBuilder(args)
     .UseStartup&lt;Startup&gt;()
     .Build();
  
  // Startup.cs
  public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  {
      app.UseExceptionHandler("/Error/HandleError");
      app.UseStaticFiles();
  
      app.UseMvc(routes =&gt;
      {
          routes.MapRoute( name: "default", template: "{controller=User}/{action=Index}/{id?}");
      });
  }
  </code></pre>