views:

20

answers:

1

I've been converting some web site projects to web application projects. This involves using some automated tools to make many, many changes across projects. Oftentimes, the files become syntactically incorrect. When this happens to the codebehind files, I get a compile-time error and I know to fix the problem.

However, when the code in global.asax or the code inside of <% %> in the aspx files becomes incorrect, I ordinarily don't see any error until run-time. However, if I open up the aspx files in the code editor, I see the errors in the VS Error List.

One way of looking for errors would be to open up every asax and aspx file in the code editor and look at the error list. However, it seems that there ought to be some simple way to check for errors on all files.

How can I do this?

+1  A: 

You need to run ASP.NET pre-compilation. This will perform the same compilation steps that both IIS and Visual Studio do to get a list of compilation errors.

Igor Zevaka
Is there an easy way to see the pre-compilation errors in Visual Studio 2k8?
Rice Flour Cookies
Maybe if you make recompilation a postbuild step. Not sure if the error go to the errors pane with that setup, but they'd definitely show up in the output window.
Igor Zevaka