title: Why MSBuild build the project? Understanding the output of MSBuild project build output
body: <p>We have a solution with roundabout 150 projects. If I make a change in one project, MSBuild should build it and all other, that depends on it. So far so good.
  But sometimes it happens, that MSBuild build up to 100 projects new, when I make a change. If I repeat the change and touch all files, I had edited before, then MSBuild only build the 4 projects I expected.</p>
  
  <p>Now I have changed the Option 'MSBuild project build output verbosity' to 'Detailed' and I get the output below for one project, which I not expected to be build. Unfortunately I don't understand the output. There are more than 400 lines for this project build; I print the first 12 lines. 
  Can anyone tell me why this build started? Or in which file I have to look for more information.</p>
  
  <p>The output:</p>
  
  <pre><code>2&gt;------ Build started: Project: msg, Configuration: Release Win32 ------
  2&gt;Build started 05.02.2016 09:48:34.
  2&gt;Building with tools version "12.0".
  2&gt;Target "_CheckForInvalidConfigurationAndPlatform" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "D:\TFS\TPA\VPLM\dev\main\src\infra\msg\msg.vcxproj" (entry point):
  2&gt;Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
  2&gt;Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
  2&gt;Using "Message" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
  2&gt;Task "Message"
  2&gt;  Configuration=Release
  2&gt;Done executing task "Message".
  2&gt;Task "Message"
  2&gt;  Platform=Win32
  2&gt;Done executing task "Message".
  </code></pre>
  
  <p>I interpret the 'Done' that MSBuild had done something. But what and Why?
  We are using Visual Studio 12.</p>
  
  <p>here the lines before the Pre-Build-Step starts:</p>
  
  <pre><code>2&gt;Using "Touch" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
  2&gt;Task "Touch"
  2&gt;  Creating "D:\vm_build_release\int\msg\\msg.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
  2&gt;Done executing task "Touch".
  2&gt;Done building target "InitializeBuildStatus" in project "msg.vcxproj".
  2&gt;Target "AssignProjectConfiguration" skipped. Previously built successfully.
  2&gt;Target "_SplitProjectReferencesByFileExistence" skipped. Previously built successfully.
  2&gt;Target "BuildGenerateSourcesTraverse" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "D:\TFS\TPA\VPLM\dev\main\src\infra\msg\msg.vcxproj" (target "BuildGenerateSources" depends on it):
  2&gt;Task "MSBuild" skipped, due to false condition; ('$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true') was evaluated as ('' == 'true' and '' != '' and '' != '' and '' == 'true').
  2&gt;Done building target "BuildGenerateSourcesTraverse" in project "msg.vcxproj".
  2&gt;Target "PrepareForBuild" skipped. Previously built successfully.
  2&gt;Target "ResolveReferences" skipped. Previously built successfully.
  2&gt;Target "BeforeBuildGenerateSources" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.BuildSteps.Targets" from project "D:\TFS\TPA\VPLM\dev\main\src\infra\msg\msg.vcxproj" (target "_BuildGenerateSourcesAction" depends on it):
  2&gt;Done building target "BeforeBuildGenerateSources" in project "msg.vcxproj".
  2&gt;Target "PreBuildEvent" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets" from project "D:\TFS\TPA\VPLM\dev\main\src\infra\msg\msg.vcxproj" (target "_BuildGenerateSourcesAction" depends on it):
  2&gt;Task "Message" skipped, due to false condition; ('%(PreBuildEvent.Message)' != '' and '%(PreBuildEvent.Command)' != '') was evaluated as ('' != '' and 'copy ..\..\..\Version\FileVersion.h .\' != '').
  2&gt;Using "Exec" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
  2&gt;Task "Exec"
  2&gt;  copy ..\..\..\Version\FileVersion.h .\
  2&gt;  :VCEnd
  2&gt;          1 file(s) copied.
  2&gt;Done executing task "Exec".
  </code></pre>
  
  <p>The line "copy ......\Version\FileVersion.h .\" is the Pre-Build-Step. This starts only in the case something was be changed before!</p>