Code Generation

A Custom Build Action can be easily added: http://blogs.msdn.com/b/msbuild/archive/2005/10/06/477064.aspx

Interesting article about MSBuild configuration: http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx

Info on C# DOM parsing

http://www.mono-project.com/Cecil

http://wiki.sharpdevelop.net/NRefactory.ashx

http://stackoverflow.com/questions/81406/parser-for-c