title: 'IServiceCollection' does not contain a definition for 'AddSpaStaticFiles'
body: <p>I cant figure out why Startup.cs is throwing this error. I tried the solutions suggested <a href="https://stackoverflow.com/questions/44409554/iservicecollection-does-not-contain-a-definition-for-addsession">here</a> (including restarting my machine and running dotnet restore) with no luck. Any ideas?</p>
  
  <blockquote>
    <p>CS1061 'IServiceCollection' does not contain a definition for 'AddSpaStaticFiles' and no accessible extension method 'AddSpaStaticFiles' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/aVez5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aVez5.png" alt="enter image description here"></a></p>
  
  <p>using statements at the top of startup.cs:</p>
  
  <pre><code>using Microsoft.AspNetCore.Builder;
  using Microsoft.AspNetCore.Hosting;
  using Microsoft.Extensions.Configuration;
  using Microsoft.Extensions.DependencyInjection;
  using Myproject.Models;
  
  using Microsoft.EntityFrameworkCore;
  using Microsoft.AspNetCore.Identity;
  using Microsoft.AspNetCore.Authentication.JwtBearer;
  using Microsoft.IdentityModel.Tokens;
  using System.Text;
  //Install-Package Microsoft.AspNetCore.Session
  //Install-Package AutoMapper.Extensions.Microsoft.DependencyInjection
  </code></pre>
  
  <p>My .csproj file contains:</p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="5.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Session" Version="2.1.1" /&gt;
      &lt;PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.2.4" /&gt;
      &lt;PackageReference Include="Flurl.Http" Version="2.2.1" /&gt;
      &lt;PackageReference Include="jQuery" Version="3.3.1" /&gt;
      &lt;PackageReference Include="jQuery.Validation" Version="1.17.0" /&gt;
      &lt;PackageReference Include="LeanKit.API.Client" Version="1.2.6" /&gt;
      &lt;PackageReference Include="Newtonsoft.Json" Version="11.0.2" /&gt;
  
      &lt;PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.2" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.1.0-preview1-final" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>