TagHelpers not being processed in views other than _Layout
user44446 Published in September 20, 2018, 4:51 pm
I load a page and when I use a custom Layout it appears that the _ViewImports file may not being applied. Not sure how to troubleshoot this. If I set Layout = _Layout, the asp- tags work just fine (specifically asp-append-version). So it's not how I'm calling the view or the layout in my view. Nothing else changes except the name of the Layout I want.
It was my understanding that _ViewImports is loaded before any Layout that is specified and it gets applied globally. Also, from what I can tell, there is nothing special at the beginning of the _Layouts file that would force the loading of _ViewImports (especially considering I put any directives at the top of my _Layouts into _CustomLayout and I still got the same behavior).
I am using ASP.NET Core 1.1. Does anyone have any similar experiences and/or fixes? I'm sort of stumped.
asp.net-mvc razor asp.net-core asp.net-core-1.1
share|improve this question
edited Feb 12 at 17:20
asked Feb 9 at 20:55
Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.
Browse other questions tagged asp.net-mvc razor asp.net-core asp.net-core-1.1 or ask your own question.