Mate, that sounds really frustrating.
Answering the first part of your question, “How can I diagnose this issue?” I’d firstly attempt to pop on verbose logging for MS Build processes. This should show you exactly what’s going on, and possibly if it’s stuck on something could show you the problem resource (Visual Studio: Tools | Options → Projects and Solutions | Build & Run → MSBuild project build output verbosity, MSBuild project build log verbosity).
Further to that if that yields nothing (some part of MSBuild itself stuck and not yield any log) I’d see about bringing in the big guns; download Russinovic’s Process Monitor and it will allow you to, using kernel hooks, to monitor all files, registry access and network access that MSBuild is attempting to request. Put on a filter for Process Name = MsBuild.exe. It’s possible that this make some sense of what’s causing the process to hang.
If all else fails you could download the Windows symbol files and attach a debugger to MSBuild.exe, break execution, trawl the threads and see what it was doing that’s causing the problem. (Bit of a sledgehammer approach, but goes direct to the source of the problem).
Further to that, you could try the project on another machine, or try rolling back from SCM and see if the error still occurs. I doubt it would be something like a recursive include as I compilers pick up on this nowadays; that said a rollback would resolve that anyway. There’s of course the less scientific options: reinstall Visual Studio, reinstall windows, renounce computer and embrace Amishism, etc.
As far as fixing it’s concerned, it of course really depends on the results of the diagnostics. It could be any one of a number of issues: MSBuild configuration, Waveworks issue, Visual Studio environment settings, firewall, antivirus, it could even be a int13h/UEFI error from accessing a certain file.
Let me know how it goes I’d be interested to know what the root cause of it is.