<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi All,<div><br></div><div>I'm trying to switch from devenv to msbuild on the command line so we can use the /m parallel build option. On devenv, I just build the ALL_BUILD target and it builds properly. However, on msbuild, there are two issues.</div><div><br></div><div>1. If I specify the ALL_BUILD target on the command line directly, I get the following errors. (... used to remove large paths)</div><div><br></div><div><pre class="gmail-console-output" style="box-sizing:border-box;white-space:pre-wrap;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"><b>c:\tmp\...>msbuild c:\tmp\...\mysolution.sln /t:ALL_BUILD /p:Configuration=Release /m || goto :ERROR
</b>Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 5/10/2019 1:01:52 PM.
1>Project "c:\tmp\...\mysolution.sln" on node 1 (ALL_BUILD target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
ValidateProjects:
The project "ALL_BUILD" is not selected for building in solution configuration "Release|x64".
The project "Continuous" is not selected for building in solution configuration "Release|x64".
The project "Experimental" is not selected for building in solution configuration "Release|x64".
The project "Nightly" is not selected for building in solution configuration "Release|x64".
The project "NightlyMemoryCheck" is not selected for building in solution configuration "Release|x64".
The project "RUN_TESTS" is not selected for building in solution configuration "Release|x64".</pre><pre class="gmail-console-output" style="box-sizing:border-box;white-space:pre-wrap;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"> ...
1>Project "c:\tmp\...\mysolution.sln" (1) is building "...\myproj.vcxproj.metaproj" (2) on node 1 (ALL_BUILD target(s)).
<b> 2>Project "c:\tmp\...\myproj.vcxproj.metaproj" (2) is building "c:\tmp\...\ZERO_CHECK.vcxproj" (54) on node 2 (ALL_BUILD target(s)).
</b> 54>c:\tmp\...\ZERO_CHECK.vcxproj : error MSB4057: The target "ALL_BUILD" does not exist in the project.
54>Done Building Project "c:\tmp\...\ZERO_CHECK.vcxproj" (ALL_BUILD target(s)) -- FAILED.
2>Done Building Project "c:\tmp\...\myproj.vcxproj.metaproj" (ALL_BUILD target(s)) -- FAILED.
1>Done Building Project "c:\tmp\...\mysolution.sln" (ALL_BUILD target(s)) -- FAILED.
Build FAILED.
"c:\tmp\...\mysolution.sln" (ALL_BUILD target) (1) ->
"c:\tmp\...\myproj.vcxproj.metaproj" (ALL_BUILD target) (2) ->
"c:\tmp\...\ZERO_CHECK.vcxproj" (ALL_BUILD target) (54) ->
c:\tmp\...\ZERO_CHECK.vcxproj : error MSB4057: The target "ALL_BUILD" does not exist in the project.
0 Warning(s)
1 Error(s)
</pre></div><div><br></div><div>What is different with the ALL_BUILD target between msbuild and devenv? I must be calling things improperly on the command line, but I'm not sure what.</div><div><br></div><div>2. If I instead leave ALL_BUILD off and just let it build the defaults, it gets further, but it also trys to build targets that are not enabled with the "all" target by default like our unit tests which we add through a hierarchy of targets like "run_tests_...".</div><div><br></div><div><pre class="gmail-console-output" style="box-sizing:border-box;white-space:pre-wrap;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-size:14px"><b>c:\tmp\...>msbuild c:\tmp\...\mysolution.sln /p:Configuration=Release /m || goto :ERROR
</b></pre></div><div><b><br></b></div><div>Should calling msbuild on just the solution build only the "all" target by default, or does mbuild just build everything in the solution ignoring the "all" target stuff?</div><div><br></div><div>Thanks!</div></div></div></div>