Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18738

Update bamboo-dotnet-plugin vcvarsall.bat path in devenvrunner.bat for VisualStudio 2017

      Summary

      The location of vcvarsall.bat has changed in Visual Studio 2017. We hard code this in devenvrunner.bat so the builds are not running.

      Steps to Reproduce

      1. Install Visual Studio 2017 with C++ tools
      2. Run a Visual Studio build task

      Expected Results

      The build find vcvarsall.bat and sets all the required variables

      Actual Results

      The build cannot find the file, so the build is unable to run.

      Workaround

      Update the devenvrunner.bat to have the path be:

      call "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" %BAM_VS_ARCH%

            [BAM-18738] Update bamboo-dotnet-plugin vcvarsall.bat path in devenvrunner.bat for VisualStudio 2017

            emmanuel_m is this a theoretical question or are you experiencing problem with recent VS release?

            Krystian Brazulewicz added a comment - emmanuel_m is this a theoretical question or are you experiencing problem with recent VS release?

            You cannot expect folder structure in visual studio to remain forever unchanged, and hard coding a relative path in devenvrunner.bat is not a good idea. @Atlassian: Why not allow the path to vcvarsall.bat to be specified in the task?

            Emmanuel Mouille added a comment - You cannot expect folder structure in visual studio to remain forever unchanged, and hard coding a relative path in devenvrunner.bat is not a good idea. @Atlassian: Why not allow the path to  vcvarsall.bat to be specified in the task?

            Is there any ETA?

            Daniel Hilgarth added a comment - Is there any ETA?

            pradeep added a comment -

            Does this works for anyone? I'm having the same issue with VS 2017 build on bamboo.

            pradeep added a comment - Does this works for anyone? I'm having the same issue with VS 2017 build on bamboo.

            Luke added a comment -

            ...although I then found out the file is regenerated! Whoops. It definitely needs to be reworked though because there are a lot of assumptions built into the file.

            Luke added a comment - ...although I then found out the file is regenerated! Whoops. It definitely needs to be reworked though because there are a lot of assumptions built into the file.

            Luke added a comment -

            I edited the end of devenvrunner.bat to add the following lines to test for both paths before deciding which to run:

            cd "%BAM_WORK_DIR%"
            @echo on
            if exist "%BAM_VS_HOME%\VC\vcvarsall.bat" goto vs2015
            if exist "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" goto vs2017
            echo Could not find vsdevcmd.bat, exiting
            exit 1
            
            :vs2015
            call "%BAM_VS_HOME%\VC\vcvarsall.bat" %BAM_VS_ARCH%
            goto buildsolution
            
            :vs2017
            call "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" %BAM_VS_ARCH%
            goto buildsolution
            
            :buildsolution
            call "%BAM_VS_HOME%\Common7\IDE\devenv.com" %BAM_ARGS%
            exit ERRORLEVEL
            

            Luke added a comment - I edited the end of devenvrunner.bat to add the following lines to test for both paths before deciding which to run: cd "%BAM_WORK_DIR%" @echo on if exist "%BAM_VS_HOME%\VC\vcvarsall.bat" goto vs2015 if exist "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" goto vs2017 echo Could not find vsdevcmd.bat, exiting exit 1 :vs2015 call "%BAM_VS_HOME%\VC\vcvarsall.bat" %BAM_VS_ARCH% goto buildsolution :vs2017 call "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" %BAM_VS_ARCH% goto buildsolution :buildsolution call "%BAM_VS_HOME%\Common7\IDE\devenv.com" %BAM_ARGS% exit ERRORLEVEL

            dnikolic added a comment -

            Previous comment has wrong script, it should be:

            setlocal
            set script=Auxiliary\Build\vcvarsall.bat
            "%~dp0%script%" %*
            endlocal
            

            Cheers

            dnikolic added a comment - Previous comment has wrong script, it should be: setlocal set script=Auxiliary\Build\vcvarsall.bat "%~dp0%script%" %* endlocal Cheers

            dnikolic added a comment -

            What worked for me to get VS2017 build working was creating a vcvarsall.bat script in VC folder that would pass arguments onto the correct script in \Auxiliary\Build as follows:

            setlocal
            Auxiliary\Build\vcvarsall.bat %*
            endlocal

            dnikolic added a comment - What worked for me to get VS2017 build working was creating a vcvarsall.bat script in VC folder that would pass arguments onto the correct script in \Auxiliary\Build as follows: setlocal Auxiliary\Build\vcvarsall.bat %* endlocal

            It appears that vcvarsall has been replaced by:

            "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd"

             

            Thomas Farthing added a comment - It appears that vcvarsall has been replaced by: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd"  

            jcbsv added a comment -

            Why is this marked as occurrence factor 10%? It happens in 100% of cases where you want to use Visual Studio 2017.

            This issue should be a top priority, Bamboo simply does not work with Visual Studio 2017.

            jcbsv added a comment - Why is this marked as occurrence factor 10%? It happens in 100% of cases where you want to use Visual Studio 2017. This issue should be a top priority, Bamboo simply does not work with Visual Studio 2017.

              glewandowski Grzegorz Lewandowski
              ezeidan Ellie Z (they/them)
              Affected customers:
              7 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: