Skip to content

Conversation

@captainsafia
Copy link
Member

As part of the changes made in f7e1712, we introduced a behavior change that caused the WebApplicationFactory to throw an exception if it did not find a ContentRoot in the manifest file.

This is breaking from the previous implementation that fell back to a path relative to the app assembly if a ContentRoot attribute wasn't defined in the assembly.

Update the method signature of GetContentRootFromFile to match the signature of GetContentRootFromAssembly and return a string? without throwing an exception.

Fixes #34354

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jul 17, 2021
@captainsafia captainsafia requested review from HaoK and javiercn July 17, 2021 20:00
@captainsafia captainsafia marked this pull request as ready for review July 17, 2021 20:00
@captainsafia captainsafia requested a review from pranavkm as a code owner July 17, 2021 20:00
@captainsafia captainsafia merged commit 4af283a into main Jul 19, 2021
@captainsafia captainsafia deleted the safia/web-app-fact-fix branch July 19, 2021 15:53
@ghost ghost added this to the 6.0-rc1 milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory no longer allows the content root to be set programatically in some cases

3 participants