JasperFx/alba

Relative content root being overwritten

josephwoodward opened this issue · 0 comments

I'm currently configuring the TestServer by using the IWebHostBuilder delegate like so:

_client = SystemUnderTest.ForStartup<Startup>(x =>
{
    x.UseEnvironment("Development");
    x.UseSolutionRelativeContentRoot("src/Website");
    return x;
}).Server.CreateClient();

I want to set /src/Website as the ContentRoot (as opposed to the bin directory), however I'm noticing that the ContentRoot is then being overwritten by AppContext.BaseDirectory within here

It strikes me that the .useContentRoot(...) call on the aforementioned line should only occur if the content root hasn't already been set by the invocation of the builder delegate above it.