Question: When running msbuild.exe with ANT's exec task, errors in the .net code do not result in the build process failing.

Why would this be?

Answer: 
I use Nant to run some MSBuild tasks. Every time I use the `failonbuild` attribute of that task, it fails for me. Looking at Apache's documentation for Ant, it would appear the same attribute is there as well. Are you using this attribute?
I arrived at a solution and used `Exec`'s `failonerror`, works like a charm.