2009-05-28 54 views

回答

4

您可以手动更新.csproj文件,并添加一个<MvcBuildViews>true</MvcBuildViews>,随时编译视图。

这是链接我googled,你会发现其他人。

编辑:如果速度太慢,尝试设置版本仅用于发布,编辑csproj文件做这样的事情;有关更多详细信息,请参阅AspNetCompiler的文档。

<!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
    Other similar extension points exist, see Microsoft.Common.targets. 
    --> 
<Target Name="BeforeBuild"> 
</Target> 
<Target Name="AfterBuild"> 
    <AspNetCompiler VirtualPath="Temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" /> 
</Target> 
+0

它的工作原理,但它是slooooooooow! – Ricibald 2009-06-04 08:17:36

0

我假设你在谈论C#编译错误,而不是像CSS验证错误之类的东西。

您可以做的一件事是将Web Deployment Project添加到您的解决方案。当它生成时,它将在您的项目上运行aspnet_compiler.exe,这将在.aspx文件中公开任何这些C#编译错误,否则这些错误将不会被指示,直到.aspx文件在运行时即时编译。