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

devenvrunner.bat loses working directory setting when called and run.

    • Icon: Bug Bug
    • Resolution: Low Engagement
    • Icon: Low Low
    • None
    • 6.9.2
    • Tasks

      Summary

      devenvrunner.bat loses working directory setting when called and run.

      Environment

      • Bamboo 6.9.2
      • Plan building with Visual Studio.

      Steps to Reproduce

      1. Create a plan with a Visual Studio task.
      2. Make the plan run, using the variable BAM_WORK_DIR at some point.

      Expected Results

      Build works as expected

      Actual Results

      Variable loses its value.

      Notes

      Apparently the dot-net plugin is overwritting the file every time the build runs, therefore it's not possible to permanently edit this file.

      Workaround

      Modify the content of the file <bamboo-agent-home>\DotNetSupport\devenvrunner.bat when the build runs, from

      cd "%BAM_WORK_DIR%"
      
      if exist "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" (
      SET VCVARSALL="%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat"
      ) else (
      SET VCVARSALL="%BAM_VS_HOME%\VC\vcvarsall.bat"
      )
      @echo on
      call %VCVARSALL% %BAM_VS_ARCH%
      call "%BAM_VS_HOME%\Common7\IDE\devenv.com" %BAM_ARGS%
      exit ERRORLEVEL
      

      to

      if exist "%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat" (
      SET VCVARSALL="%BAM_VS_HOME%\VC\Auxiliary\Build\vcvarsall.bat"
      ) else (
      SET VCVARSALL="%BAM_VS_HOME%\VC\vcvarsall.bat"
      )
      @echo on
      call %VCVARSALL% %BAM_VS_ARCH%
      cd "%BAM_WORK_DIR%"
      call "%BAM_VS_HOME%\Common7\IDE\devenv.com" %BAM_ARGS%
      exit ERRORLEVEL
      

            [BAM-20611] devenvrunner.bat loses working directory setting when called and run.

              Unassigned Unassigned
              pdemitrio Patricio
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: