These goals are contained in a file called Microsoft.Common.targets . This file is imported into your scripts through another import, Microsoft.CSharp.targets (or similar for other languages). Therefore, they are always determined when assembly begins. In project files, you can override these goals by re-declaring them after the <Import statement for the previously mentioned file. If you declare them before <Import , then your goals will be ignored, because empty ones in Microsoft.Common.targets will be used.
For more information on expanding the build process, see my article Inside MSBuild, or better than my book Inside Microsoft Build Engine !
In response to a previous commenter, these goals are part of the build process that builds your projects. They are written to MSBuild files and are not part of MSBuild and Visual Studio.
source share