寻找自动化编译ASP.NET页面错误 [英] Automating finding compile errors in ASP.NET pages

查看:133
本文介绍了寻找自动化编译ASP.NET页面错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET网站,网页调用一些组件的DLL。我需要改变方法的签名中的分量,总之做一个文本搜索,不知道这是否会打破任何网页或没有。海事组织,这是Web编程的弱点 - 你没有得到一个编译器的好处告诉你关于语法错误

I have an ASP.NET website where the pages call a few components in DLLs. I need to change the signature of a method in the component, and short of doing a text search, don't know if this will break any pages or not. IMO, this is the weakness of web programming -- you don't get the benefit of a compiler telling you about syntax errors.

不过,这并不需要如此。有谁知道是否有跑过来一个网站蜘蛛留意编译错误的方式,或者是一些工具,将编译所有的.aspx文件中的文件夹结构,寻找编译错误?

But it doesn't need to be so. Does anyone know if there is a way to run a spider over a website watching for compile errors, or perhaps some tool that would compile all the .aspx files in a folder structure looking for compile errors?

这仅仅是语法检查 - 不实际pre-编译网站

This is merely for syntax checking -- not to actually pre-compile the website.

修改它看起来像被推荐aspnet_compiler的。我不使用Visual Studio项目的网站 - 它的成长随着时间的推移我自己的模板系统(前回母版页都可用)。因此,这将在文件夹中运行aspnet_compiler过的所有文件的东西可能工作...

EDIT It looks like aspnet_compiler is being recommended. I don't use Visual Studio projects for the website -- it's grown over time with my own templating system (back before Master Pages were available). So something that would run aspnet_compiler over all the files in a folder might work...

推荐答案

有就是你可以把你的项目,在什么时候项目编译它来编译所有的ASPX文件的标记。它增加了时间来构建,但有时也可能是值得的。请参见 http://mikehadlow.blogspot.com/2008/05/编译-ASPX模板 - using.html

There is a flag that you can put on your project that tells it to compile all the aspx files when the project is compiled. It adds time to your build, but it can sometimes be worthwhile. See http://mikehadlow.blogspot.com/2008/05/compiling-aspx-templates-using.html

另外,ReSharper的是找到方法的引用真的很好,即使是在ASPX文件。所以,如果你使用ReSharper的重命名的方法,只要你的解决方案包括web项目,它会查找和重命名方法在ASPX文件了。

Also, Resharper is really good at finding references to methods, even in aspx files. So if you use Resharper to rename a method, as long as your solution includes the web project, it'll find and rename that method in the aspx files, too.

这篇关于寻找自动化编译ASP.NET页面错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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