OrganizingAspNetCore
OrganizingAspNetCore copied to clipboard
Razor class libs
I noticed that if you are using razor class libs, the controllerActionDescriptor in FeatureViewLocationExpander will be null.
I added
if (controllerActionDescriptor == null)
{
// make sure shared stuff is searched for under the "features" folder
foreach (var location in viewLocations)
{
yield return location.Replace("Pages", "Features");
}
}
so that if a razor class lib would reference views/shared it still would be found. Let me know if you think this is a good idea, then I will make a pr.