title: What is the difference between a PreBuildEvent, BeforeBuild target and BeforeCompile target in MSBuild?
body: <p>I recently had to move some code from a <a href="http://blog.dantup.com/2011/05/setting-up-nuget-to-automatically-fetch-packages-when-deploying-to-appharbor-without-storing-binaries-in-source-control">PreBuildEvent in Visual Studio into the BeforeBuild target to make it work on AppHarbor</a>. While doing so, I also noticed a BeforeCompile target.</p>
  
  <p>What is the difference between these three seemingly similar events: PreBuildEvent, BeforeBuild Target, BeforeCompileTarget?</p>
  
  <p>What can/can't be done with each, and why would you pick one over another?</p>