最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Razor rendering issue on Visual Studio 17.12 - Stack Overflow

programmeradmin2浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论