none
Why is my build script building DynDebug|x64 on one machine and DynDebug|Win32 on another? RRS feed

  • Question

  • I have an enlistment in a source tree which includes a batch file to drive builds. The batch file calls another batch file which calls msbuild. 

    As far as I know, both build environments are identical,but the build is failing in the newer machine (which has never completed a build). 

    In looking through the logs, I see that on one machine I am building DynDebug|x64, and the other DynDebug|Win32. 

    How can this be happening? I have lived a good life. 

    The first batch file is a' doin' this:

    CALL buildbase.bat ..\vs2015\libsodium.sln 14

    The second one (buildbase.bat) is a' doin' this:

    SET solution=%1
    SET version=%2
    SET log=build_%version%.log
    SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
    SET environment="%programfiles(x86)%\%tools%"
    IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
    IF NOT EXIST %environment% GOTO no_tools

    ECHO Building: %solution%

    CALL %environment% x86 > nul
    ECHO Platform=x86

    ECHO Configuration=DynDebug
    msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% > %log%
    IF errorlevel 1 GOTO error
    ECHO Configuration=DynRelease
    msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log%
    IF errorlevel 1 GOTO error
    ECHO Configuration=LtcgDebug
    msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log%
    IF errorlevel 1 GOTO error
    ECHO Configuration=LtcgRelease
    msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log%
    IF errorlevel 1 GOTO error

    So I get why I am getting the DynDebug|Win32 (which is breaking).

    I don't get why I am seeing DynDebug|x64, and I really, really don't get why they are different. AFAICT the machine environments are identical

    There is a hidden variable - a rat in the woodpile. 

    Where is that rat, and what does he look like?

    Beetle

    Friday, March 25, 2016 10:52 PM

Answers

  • Hi Beetle Bailey,

    >>As far as I know, both build environments are identical,but the build is failing in the newer machine (which has never completed a build).

    >>In looking through the logs, I see that on one machine I am building DynDebug|x64, and the other DynDebug|Win32.

    >>I don't get why I am seeing DynDebug|x64, and I really, really don't get why they are different. AFAICT the machine environments are identical.

    According to your bat code, I think you could first refer to the following link to check whether you have built the corresponding available configuration to make sure the MSBuild code could works fine.

    http://stackoverflow.com/questions/3155492/how-to-specify-platform-for-msbuild

    About why you get the “DynDebug|x64”, you should make sure the Windows OS is the same version and the VS has the same version with same update. Then, you could first run the same MSBuild code on your new environment to check whether the issue could be reproduced.

     As you said, the new newer machine has never completed a build, could you show more things for this? If this machine could not build a project even through VS IDE, you could try reinstalling the VS.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 29, 2016 9:08 AM