I am currently working on a Visual Studio extension for VS2012 and decided to host the build on Team Foundation Service. The initial commit of the source code went fine but the automated build failed.
Having left it for a week I decided to spend some time trying to fix it. Fortunately I came across the following article, Visual Studio Extensions and Build Servers, without which I don't think I would have got it to work. Following all the steps I managed to get my extension to build although it did take a while.
If you are trying to get an extension to build then read this article now.
If only they had actually thought about it and made the process simpler.