ASP.net Web窗体,在编译时得到的aspx /视图错误? [英] ASP.net Web Forms, get aspx/view errors at compile time?

查看:257
本文介绍了ASP.net Web窗体,在编译时得到的aspx /视图错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这可以用MVC2来完成,但是有什么办法适用于Visual Studio(2010)/ ReSharper的(6)在编译时检查的aspx页面错误,停止建设? ReSharper的可以检测到错误就好了,所以好像应该是所有的ASPX页面的检查中生成过程集成的方法。

I know this can be done with mvc2, but is there any way for visual studio(2010)/resharper(6) to check for errors on aspx pages at compile time and halt the build? Resharper can detect the errors just fine, so it seems like there should be a way to integrate a check of all the aspx pages in to the build process.

任何提示?

推荐答案

当然可以。下面的步骤将导致.aspx文件被编译成由IDE,不需要任何插件ReSharper的调用正常builk的一部分。

Yes you can. The following steps will cause .aspx files to be compiled as part of a normal builk invoked by the IDE, no Resharper plugin required.


  • 卸载您的Web应用程序(右键单击该项目并选择卸载项目')

  • 打开一个文本编辑器中的.csproj文件(右键单击该项目,并选择编辑myProjectName.csproj')

  • 在文件的底部,找到它说在注释修改您的构建过程......并插入下面的注释后:

<目标名称=AfterBuild>< AspNetCompiler VirtualPath =TEMPPhysicalPath =$(PROJECTDIR)/>< /目标>

源代码 - <一个href=\"http://eliasbland.word$p$pss.com/2010/08/18/compile-aspx-pages-at-compile-time-using-the-aspnetcompiler-build-task/\">Compile在编译时ASPX页面使用AspNetCompiler建设任务<​​/A>

Source - Compile Aspx pages at compile time using the AspNetCompiler build task

这篇关于ASP.net Web窗体,在编译时得到的aspx /视图错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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