Skip to content

Commit 627ec69

Browse files
committed
Use solution-relative contentRoot path, when the path frmo metadata either is not available or doesn't exist.
1 parent 9c0fb14 commit 627ec69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private void SetContentRoot(IWebHostBuilder builder)
249249
var fromFile = File.Exists("MvcTestingAppManifest.json");
250250
var contentRoot = fromFile ? GetContentRootFromFile("MvcTestingAppManifest.json") : GetContentRootFromAssembly();
251251

252-
if (contentRoot != null)
252+
if (contentRoot != null && Directory.Exists(contentRoot))
253253
{
254254
builder.UseContentRoot(contentRoot);
255255
}

0 commit comments

Comments
 (0)