title: WebApplicationFactory throws error that contentRootPath does not exist in ASP.NET Core integration test
body: <p>I have a ASP.NET Core project with some simple Razor pages and a Web API controller.</p>
  
  <p>I'm using <a href="https://github.com/ardalis/CleanArchitecture" rel="noreferrer">Clean Architecture</a> as a starting point. I've renamed the project names, removed the MVC stuff and added some of my own code. Everything runs and works.</p>
  
  <p>However, the integration tests throw the following error when calling <code>factory.CreateClient()</code>:</p>
  
  <pre><code>Test Name:  ToDo.Tests.Integration.Web.HomeControllerIndexShould.ReturnViewWithCorrectMessage
  Test FullName:  ToDo.Tests.Integration.Web.HomeControllerIndexShould.ReturnViewWithCorrectMessage
  Test Source:    C:\Source\Utopia\tests\ToDo.Tests\Integration\Web\HomeControllerIndexShould.cs : line 18
  Test Outcome:   Failed
  Test Duration:  0:00:00,001
  
  Result StackTrace:  
  at Microsoft.AspNetCore.Hosting.Internal.HostingEnvironmentExtensions.Initialize(IHostingEnvironment hostingEnvironment, String contentRootPath, WebHostOptions options)
     at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException&amp; hostingStartupErrors)
     at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
     at Microsoft.AspNetCore.TestHost.TestServer..ctor(IWebHostBuilder builder, IFeatureCollection featureCollection)
     at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateServer(IWebHostBuilder builder)
     at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.EnsureServer()
     at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers)
     at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateClient(WebApplicationFactoryClientOptions options)
     at ToDo.Tests.Integration.Web.HomeControllerIndexShould..ctor(CustomWebApplicationFactory`1 factory) in C:\Source\Utopia\tests\ToDo.Tests\Integration\Web\HomeControllerIndexShould.cs:line 14
  Result Message: 
  System.ArgumentException : The content root 'C:\Source\Utopia\ToDo.Web' does not exist.
  Parameter name: contentRootPath
  </code></pre>
  
  <p>I've tried configuring the custom <a href="https://github.com/ardalis/CleanArchitecture/blob/master/tests/CleanArchitecture.Tests/Integration/Web/CustomWebApplicationFactory.cs" rel="noreferrer">WebApplicationFactory</a> by using <code>builder.UseContentRoot</code> and <code>builder.UseSolutionRelativeContentRoot</code> but it keeps throwing the same error no matter what values I use for the <code>ContentRoot</code> methods.</p>
  
  <p>I don't know why my tests are failing while the one in the Clean Architecture sample are working. I also don't know how to fix it. </p>
  
  <p>Any pointers are highly appreciated!</p>