OrganizingAspNetCore icon indicating copy to clipboard operation
OrganizingAspNetCore copied to clipboard

Razor class libs

Open gregorybleiker opened this issue 7 years ago • 0 comments

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.

gregorybleiker avatar Aug 16 '18 13:08 gregorybleiker