File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ set DOTNET_NOLOGO=true
99
1010@ REM Sets the output of GetMSBuildPath.ps1 to the MSBuildPath environment variable.
1111@ REM https://stackoverflow.com/a/3417728/294804
12- FOR /F " usebackq delims=" %%v IN (`powershell -NonInteractive -NoLogo -NoProfile -ExecutionPolicy Unrestricted -File " %~dp0 eng\scripts\GetMSBuildPath.ps1" `) DO set " MSBuildPath = %%~v "
12+ FOR /F " usebackq delims=" %%v IN (`powershell -NonInteractive -NoLogo -NoProfile -ExecutionPolicy Unrestricted -File " %~dp0 eng\scripts\GetMSBuildPath.ps1" %VisualStudioMinimumVersion% `) DO set " MSBuildPath = %%~v "
1313
1414if not defined MSBuildPath (
1515 echo Visual Studio must be installed to allow building via MSBuild.
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ variables:
3636 # Opt out of automatically injecting Codesign Validation into the pipeline.
3737 # See: https://aka.ms/gdn-injection
3838 runCodesignValidationInjection : false
39+ # Set the minimum visual studio version. This overrides the version in version.json for the build toolset.
40+ MinVisualStudioVersion : ' 17.0'
3941
4042# ##################################################################################################################################################################
4143# STAGES
@@ -49,7 +51,9 @@ stages:
4951 parameters :
5052 BuildConfiguration : Debug
5153 ArtifactName : ' $(Build.BuildNumber)-Debug'
54+ VisualStudioMinimumVersion : $(MinVisualStudioVersion)
5255 - template : templates/build-pull-request.yml
5356 parameters :
5457 BuildConfiguration : Release
5558 ArtifactName : ' $(Build.BuildNumber)'
59+ VisualStudioMinimumVersion : $(MinVisualStudioVersion)
Original file line number Diff line number Diff line change 77 variables :
88 BuildConfiguration : ${{ parameters.BuildConfiguration }}
99 ArtifactName : ${{ parameters.ArtifactName }}
10+ VisualStudioMinimumVersion : ${{ parameters.VisualStudioMinimumVersion }}
1011 steps :
1112
1213 # ##################################################################################################################################################################
4344 - task : NuGetAuthenticate@1
4445 displayName : Authenticate NuGet
4546
47+ # Sets the VisualStudioMinimumVersion variable for the job.
48+ # https://docs.microsoft.com/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=powershell#set-variable-properties
49+ - powershell : Write-Host "##vso[task.setvariable variable=VisualStudioMinimumVersion;isoutput=true]$(VisualStudioMinimumVersion)"
50+ displayName : Set VisualStudioMinimumVersion Variable
51+ # Name is required to reference the variables created within this build step in other stages.
52+ name : SetVisualStudioMinimumVersionVariable
53+
4654 # Runs the full build of the projects in the repository. See Build.proj for details.
4755 - script : $(Build.SourcesDirectory)/build.cmd /v:normal /p:Configuration=$(BuildConfiguration) /p:CIBuild=true
4856 displayName : Build All Projects
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json" ,
3- "version" : " 17.14 " ,
3+ "version" : " 18.1 " ,
44 "cloudBuild" : {
55 "setAllVariables" : true
66 }
You can’t perform that action at this time.
0 commit comments