admin管理员组

文章数量:1315991

An interesting one myself and a couple of colleagues have come across on the same project; Since updating to Visual Studio 17.12 (currently on 17.12.4) one or potentially more of my CSHTML razor files have some syntax in them that are being treated as literal and not rendering. For example, the below @(nameof(RequestHeader.Conditions)) should render to simply Conditions

However the @(nameof(RequestHeader.Conditions)) ends up in the resulting HTML.

Note that the initial @(nameof(Request.Headers)) is still being rendered correctly.

I can see in the resuling Razor generated class the end result that causes this

If I/we revert back to Visual Studio 17.11.6, the code works as expected without having to change a thing...

Any thoughts would be great cheers

本文标签: Razor rendering issue on Visual Studio 1712Stack Overflow