Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set DOTNET_NOLOGO=true

@REM Sets the output of GetMSBuildPath.ps1 to the MSBuildPath environment variable.
@REM https://stackoverflow.com/a/3417728/294804
FOR /F "usebackq delims=" %%v IN (`powershell -NonInteractive -NoLogo -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0eng\scripts\GetMSBuildPath.ps1"`) DO set "MSBuildPath=%%~v"
FOR /F "usebackq delims=" %%v IN (`powershell -NonInteractive -NoLogo -NoProfile -ExecutionPolicy Unrestricted -File "%~dp0eng\scripts\GetMSBuildPath.ps1" %VisualStudioMinimumVersion%`) DO set "MSBuildPath=%%~v"

if not defined MSBuildPath (
echo Visual Studio must be installed to allow building via MSBuild.
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ parameters:
- name: VisualStudioMinimumVersion
displayName: Visual Studio Minimum Version
type: string
default: '18'
default: '17'

###################################################################################################################################################################
# STAGES
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ variables:
# Opt out of automatically injecting Codesign Validation into the pipeline.
# See: https://aka.ms/gdn-injection
runCodesignValidationInjection: false
# Set the minimum visual studio version. This overrides the version in version.json for the build toolset.
MinVisualStudioVersion: '17.0'

###################################################################################################################################################################
# STAGES
Expand All @@ -49,7 +51,9 @@ stages:
parameters:
BuildConfiguration: Debug
ArtifactName: '$(Build.BuildNumber)-Debug'
VisualStudioMinimumVersion: $(MinVisualStudioVersion)
- template: templates/build-pull-request.yml
parameters:
BuildConfiguration: Release
ArtifactName: '$(Build.BuildNumber)'
VisualStudioMinimumVersion: $(MinVisualStudioVersion)
17 changes: 9 additions & 8 deletions eng/pipelines/templates/build-official-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
displayName: Build Official Release
# We make this timeout more than double the normal amount of build time as signing has a highly variable amount of time to complete.
timeoutInMinutes: 90 # API Scan can take a long time and fail the build
variables:
VisualStudioMinimumVersion: ${{ parameters.VisualStudioMinimumVersion }}
templateContext:
mb:
signing:
Expand Down Expand Up @@ -90,7 +92,6 @@ jobs:
allowPackageConflicts: true
nuGetFeedType: external


steps:

###################################################################################################################################################################
Expand Down Expand Up @@ -139,6 +140,13 @@ jobs:
inputs:
forceReinstallCredentialProvider: true

# Sets the VisualStudioMinimumVersion variable for the job. This variable is also used by the APIScan job.
# https://docs.microsoft.com/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=powershell#set-variable-properties
- powershell: Write-Host "##vso[task.setvariable variable=VisualStudioMinimumVersion;isoutput=true]$(VisualStudioMinimumVersion)"
displayName: Set VisualStudioMinimumVersion Variable
# Name is required to reference the variables created within this build step in other stages.
name: SetVisualStudioMinimumVersionVariable

# Runs the full build of the projects in the repository. See Build.proj for details.
- script: $(Build.SourcesDirectory)/build.cmd /v:normal /p:Configuration=$(BuildConfiguration) /p:CIBuild=true
displayName: Build All Projects
Expand Down Expand Up @@ -172,13 +180,6 @@ jobs:
- task: MicroBuildSwixPlugin@4
displayName: Install Swix Plugin

# Sets the VisualStudioMinimumVersion variable for the job. This variable is also used by the APIScan job.
# https://docs.microsoft.com/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=powershell#set-variable-properties
- powershell: Write-Host "##vso[task.setvariable variable=VisualStudioMinimumVersion;isoutput=true]$(. '$(Build.SourcesDirectory)/eng/scripts/GetVisualStudioMinimumVersion.ps1')"
displayName: Set VisualStudioMinimumVersion Variable
# Name is required to reference the variables created within this build step in other stages.
name: SetVisualStudioMinimumVersionVariable

# Creates the VS bootstrapper information based on the build's .vsman file.
# This bootstrapper information is only used for OptProf currently.
# Since this data will be output with rest of our insertion files, we produce this data now and publish it in the build artifacts.
Expand Down
8 changes: 8 additions & 0 deletions eng/pipelines/templates/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
variables:
BuildConfiguration: ${{ parameters.BuildConfiguration }}
ArtifactName: ${{ parameters.ArtifactName }}
VisualStudioMinimumVersion: ${{ parameters.VisualStudioMinimumVersion }}
steps:

###################################################################################################################################################################
Expand Down Expand Up @@ -43,6 +44,13 @@ jobs:
- task: NuGetAuthenticate@1
displayName: Authenticate NuGet

# Sets the VisualStudioMinimumVersion variable for the job.
# https://docs.microsoft.com/azure/devops/pipelines/process/set-variables-scripts?view=azure-devops&tabs=powershell#set-variable-properties
- powershell: Write-Host "##vso[task.setvariable variable=VisualStudioMinimumVersion;isoutput=true]$(VisualStudioMinimumVersion)"
displayName: Set VisualStudioMinimumVersion Variable
# Name is required to reference the variables created within this build step in other stages.
name: SetVisualStudioMinimumVersionVariable

# Runs the full build of the projects in the repository. See Build.proj for details.
- script: $(Build.SourcesDirectory)/build.cmd /v:normal /p:Configuration=$(BuildConfiguration) /p:CIBuild=true
displayName: Build All Projects
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "17.14",
"version": "18.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR build won't pass for version higher than Dev18
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, main is still generating 17.14 manifests in that case though, which is a problem

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for the official build?

I think for the official build, it's generating 18.0 manifest instead of 18.1

"cloudBuild": {
"setAllVariables": true
}
Expand Down
Loading