So sick of Microsoft.WebApplication.targets was not found build errors!

Problem: I was recently connecting an on premises build server to my Visual Studio Online account (that is crazy easy by the way) but my first build failed with the following error. The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Solution:  This is not the first time I have come across this error. Just replace “v11.0” with whatever version you want and you have been there.  In the past I would just copy files on my build machine or install countless SDK versions trying to make the build machine happy. Not this time I wanted a much clearer solution. I connected to the build machine and found the desired file in a “v12.0” folder instead of a “v11.0” folder being referenced.   So how can I simply have build use the correct version? Turns out you can simply pass Visual Studio Version on the Process tab of your build definition.  Under the Advanced section just add the following text to the MSBuild Arguments. /p:VisualStudioVersion=12.0 Problem solved and I don’t feel all dirty after. 

Where are my diagnostic build logs?

Problem: I am trying to customize TfvcTemplate.12.xaml and can’t increase the verbosity level any longer. Solution: Open the desired build and click the Diagnostics menu and select View Logs. Explanation: In the past there was an argument on the build template that allowed you to control the output verbosity.  However, in the new template that argument has been removed and is hardcoded to “Normal” on the call the msbuild.  Nevertheless, the data is being captured in the logs placed in the drop location. Simply double click on the xml files.  If you are prompted for how to open the file select Internet Explorer.  There is an xsl file that will format the data making it easy to read in Internet Explorer. You can read more here.

I can't build my Wix projects with Team Build

Problem: I get the following error when I attempt to build a solution using TFS that contains a Windows Installer XML (WIX) project: "light.exe: Error executing ICE action 'ICE01'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wix.sourceforge.net/faq.html#Error217 for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance."." Solution: The build service account must be in the Administrators group on the build machine.