title: 'IServiceCollection' does not contain a definition for 'AddSession'
body: <p>I am getting an error while adding 'AddSession' in ASP.Net Core 1.1 using VS2017.</p>
  <blockquote>
  <p>'IServiceCollection' does not contain a definition for 'AddSession'
  and no extension method 'AddSession' accepting a first argument of
  type 'IServiceCollection' could be found (are you missing a using
  directive or an assembly reference?)</p>
  </blockquote>
  <p><strong>.csproj</strong></p>
  <p>The package is already installed in this solution.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk.Web&quot;&gt;
  
  &lt;PropertyGroup&gt;
  &lt;TargetFramework&gt;netcoreapp1.1&lt;/TargetFramework&gt;
  &lt;/PropertyGroup&gt;
  
  &lt;PropertyGroup&gt;
  &lt;PackageTargetFallback&gt;$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;&lt;/PackageTargetFallback&gt;
  &lt;/PropertyGroup&gt;
   &lt;ItemGroup&gt;
    &lt;PackageReference Include=&quot;Microsoft.ApplicationInsights.AspNetCore&quot; Version=&quot;2.0.0&quot; /&gt;
    &lt;PackageReference Include=&quot;Microsoft.AspNetCore&quot; Version=&quot;1.1.1&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Mvc&quot; Version=&quot;1.1.2&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Session&quot; Version=&quot;1.1.2&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.AspNetCore.StaticFiles&quot; Version=&quot;1.1.1&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.Extensions.Logging.Debug&quot; Version=&quot;1.1.1&quot; /&gt;
  &lt;PackageReference Include=&quot;Microsoft.VisualStudio.Web.BrowserLink&quot; Version=&quot;1.1.0&quot; /&gt;
   &lt;/ItemGroup&gt;
   &lt;ItemGroup&gt;
   &lt;DotNetCliToolReference 
   Include=&quot;Microsoft.VisualStudio.Web.CodeGeneration.Tools&quot; Version=&quot;1.0.0&quot; /&gt;
  &lt;/ItemGroup&gt;
  
   &lt;/Project&gt;
  </code></pre>
  <p><strong>Error :</strong></p>
  <p><a href="https://i.stack.imgur.com/EWNNZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EWNNZ.png" alt="enter image description here" /></a></p>