title: ASP.NET PhysicalFileProvider not available in Startup.cs
body: <p>I am trying to serve static files in a ASP.NET 4.6 web application, MVC 5.2.3 using the Entity Framework. I'm following <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files" rel="nofollow noreferrer">this</a> tutorial.</p>
  
  <p>I'm getting a compiler error:</p>
  
  <blockquote>
    <p>The type or namespace name 'PhysicalFileProvider' could not be found
    (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>It seems that the using <code>Microsoft.Extensions.FileProviders</code> is not actually being used (it is grayed out in Visual Studio.</p>
  
  <p>I have tried importing various assemblies without any luck. I'm not a .NET developer and any help would be greatly appreciated.</p>
  
  <pre><code>using System;
  using System.IO;
  using System.Threading.Tasks;
  using Microsoft.Extensions.FileProviders;
  using Microsoft.Extensions.Primitives;
  using Microsoft.Owin;
  using Microsoft.Owin.StaticFiles;
  using Microsoft.Extensions.Configuration;
  
  using Owin;
  
  [assembly: OwinStartup(typeof(Monica.Startup))]
  
  namespace Monica
  {
      public partial class Startup
      {
  
          public void Configuration(IAppBuilder app)
          {
              app.UseStaticFiles(); // For the wwwroot folder
  
              app.UseStaticFiles(new StaticFileOptions()
              {
                  FileProvider = new PhysicalFileProvider(
                      Path.Combine(Directory.GetCurrentDirectory(), @"MyStaticFiles")),
                  RequestPath = new PathString("/StaticFiles")
              });
          }
      }
  }
  </code></pre>