Hi All,

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.

1. If I specify the ALL_BUILD target on the command line directly, I get
the following errors. (... used to remove large paths)

*c:\tmp\...>msbuild c:\tmp\...\mysolution.sln /t:ALL_BUILD
/p:Configuration=Release /m || goto :ERROR
*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".

         ...
     1>Project "c:\tmp\...\mysolution.sln" (1) is building
"...\myproj.vcxproj.metaproj" (2) on node 1 (ALL_BUILD target(s)).*
 2>Project "c:\tmp\...\myproj.vcxproj.metaproj" (2) is building
"c:\tmp\...\ZERO_CHECK.vcxproj" (54) on node 2 (ALL_BUILD target(s)).
*    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)


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.

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_...".

*c:\tmp\...>msbuild c:\tmp\...\mysolution.sln /p:Configuration=Release
/m || goto :ERROR
*


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?

Thanks!
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to