Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
772 views
in Technique[技术] by (71.8m points)

asp.net mvc - How to compile cshtml before runtime

I believe I read somewhere there is a setting in one of the project files that will allow you to compile the .cshtml files when building your Visual Studio project.

Just getting started with MVC/Razor/Query Mobile, and am getting annoyed with the "Error loading page" when I have an error in a code block inside a .cshtml file

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Set <MvcBuildViews>true</MvcBuildViews> in the <PropertyGroup> element of your .csproj file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...