If you're looking to tackle this task in MSBuild, I may not have the exact steps for you, but I can certainly share how I would go about it.
- To start off, get the W3C CSS Validator downloaded
- Use it within your CI platform (like Hudson or CC.net) to check all your .css files
- Look for a Markup Validator that's downloadable, like (W3 & WDG, shoutout to David!)
- Set up a way to host your dynamic pages (maybe IIS, perhaps WebDev.WebServer.exe)
- Grab the content from all those dynamic pages***
- Run them through the Markup Validator as part of your CI process.
*The 5th step may pose some challenges, as keeping track of URLs to test will likely be necessary. Opening the .aspx files directly isn't an option, and automatic URL generation might be tough with MVC due to routing complexities.
It seems like creating a CSS (potentially for static HTML too) validator plugin for Hudson or CC.net could be doable, with results display options like trend graphs, for instance.
I haven't dabbled much with using MSBuild for these tasks since I rely on Hudson. Nevertheless, incorporating all this into post-build commands should be straightforward, given its command-line nature.