title: Integration and unit tests no longer work on ASP.NET Core 2.1 failing to find assemblies at runtime
body: <p>When creating test projects or upgrading an application and tests to ASP.NET Core 2.1 / .NET Core 2.1, running tests fails with assembly load exceptions like</p>
  
  <blockquote>
    <p>System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.AspNetCore, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.</p>
  </blockquote>
  
  <p>When adding references to some other libraries there are also build warnings like</p>
  
  <blockquote>
    <p>warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.Options" that could not be resolved.<br>
    warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.Configuration.Abstractions" that could not be resolved.<br>
    warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Hosting.Abstractions" that could not be resolved.<br>
    warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.DependencyInjection.Abstractions" that could not be resolved.<br>
    warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Http.Abstractions" that could not be resolved.<br>
    warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Http.Features" that could not be resolved.</p>
  </blockquote>
  
  <p>How can I make test projects work for testing ASP.NET Core 2.1 applications?</p>