diff --git a/.pipelines/v2/templates/pipeline-ci-build.yml b/.pipelines/v2/templates/pipeline-ci-build.yml index b870a95c37..17f4654ccd 100644 --- a/.pipelines/v2/templates/pipeline-ci-build.yml +++ b/.pipelines/v2/templates/pipeline-ci-build.yml @@ -3,6 +3,9 @@ variables: value: false - name: EnablePipelineCache value: true + - ${{ if eq(parameters.enableMsBuildCaching, true) }}: + - name: EnablePipelineCache + value: true parameters: - name: buildPlatforms @@ -17,10 +20,6 @@ parameters: type: boolean default: true -variables: - ${{ if eq(parameters.enableMsBuildCaching, true) }}: - EnablePipelineCache: true - stages: # Allow manual builds to skip pre-check - ${{ if ne(variables['Build.Reason'], 'Manual') }}: