tags:

views:

94

answers:

1

Hi,

I'm looking for a way mark a build as failed if an inline reference on an aspx page is invalid.

For example:

">

If SomeText doesn't exist on Model I get the following message:

Cannot resolve symbol 'SomeText'

However, the application builds just fine. Is there any way to halt the build or mark it as failed when references such as this don't resolve? I've tried 'Treat warnings as errors', but it doesn't seem to apply to aspxs (due to the fact that they're not compiled with the rest of the app).

Thanks!

A: 

I don't know how to put this into the build process itself, but have a look at aspnet_compiler.exe.

aspnet_compiler -v /

The above command will compile your IIS root (and all files under it) and will show you any and all errors that you would normally have to wait until runtime to witness. It also means that all of your pages become precompiled so access times are reduced (for first load only)

Matthew Steeples