Compile Views in ASP.NET MVC

前端 未结 8 1348
故里飘歌
故里飘歌 2020-11-22 02:54

I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time. Any ideas?

8条回答
  •  时光取名叫无心
    2020-11-22 02:57

    Using Visual Studio's Productivity Power Tools (free) extension helps a bit. Specifically, the Solution Error Visualizer feature. With it, compilation errors marked visually in the solution explorer (in the source file where the error was found). For some reason, however, this feature does not work as with other errors anywhere else in the code.

    With MVC views, any compile-time errors will still be underlined in red in their respective .cs files, but signaling these errors is not propagated upwards in the Solution Explorer (in no way, even not in the containing source file).

    Thanks for BlueClouds for correcting my previous statement.

    I have just reported this as an issue on the extension's github project.

提交回复
热议问题