检查生成过程中的错误剃须刀 [英] Check for razor errors during build

查看:129
本文介绍了检查生成过程中的错误剃须刀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有为Visual Studio的方式(我用2010)发现剃刀视图中的错误期间生成,以同样的方式在C#项目其他code会吗?

Is there a way for Visual Studio (I'm using 2010) to find errors within razor views during builds, in the same way as other code in a C# project would?

这只是你可以在code检查任何错误,并认为一切都很好痛苦,但现在看来,你不能肯定的看法,除非你通过每一个。

It's just a pain that you can check any errors in your code and think that everything's fine, but it appears that you can't be sure about views unless you go through each one.

BTW我显然没有code在我的意见 - 我只是在谈论例如HTML或URL扩展方法

BTW I obviously don't code in my views - I'm just talking about HTML or URL extension methods for example.

推荐答案

尝试设置MVCBuildViews为true,在您的项目文件(即编辑的csproj文件)

Try setting MVCBuildViews to true in your project file (i.e. edit your csproj file)

 <MvcBuildViews>true</MvcBuildViews>

这篇关于检查生成过程中的错误剃须刀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆