title: Visual Studio and MSBuild fire BeforeBuild differently on a WiX project
body: <p>I have a <a href="http://en.wikipedia.org/wiki/WiX" rel="noreferrer">WiX</a> (Windows installer XML) v3, project which contains references to other projects in my solution. I am using the copy task inside the BeforeBuild event of the WiX project to collect some of the output of the references projects for later use my <a href="https://en.wikipedia.org/wiki/WiX#Tallow.2FHeat" rel="noreferrer">Heat</a>.</p>
  
  <p>When I build the WiX project (not the solution) inside Visual Studio, each of the referenced projects is build before my WiX project and once they are built, the BeforeBuild event on my WiX project fires and then the WiX project itself is built. This is the behaviour I expect - I am able to access files from the bin directories of the references projects in the WiX BeforeBuild and use them as I please before the WiX project executes <a href="https://en.wikipedia.org/wiki/WiX#Candle" rel="noreferrer">Candle</a>.</p>
  
  <p>The problem I am having is when I build the WiX file via <a href="http://en.wikipedia.org/wiki/MSBuild" rel="noreferrer">MSBuild</a> I am finding that the BeforeBuild event fires straight away BEFORE any of the referenced projects. This difference in behaviour means that I cannot make use of the outputs of the referenced projects when building from the command line.</p>
  
  <p>Why is BeforeBuild executing at a different point in time when run via MSBuild on the command line to inside Visual Studio?</p>