diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml
index 899a663af2..17680d3024 100644
--- a/.pipelines/v2/templates/job-build-project.yml
+++ b/.pipelines/v2/templates/job-build-project.yml
@@ -213,6 +213,8 @@ jobs:
parameters:
sdk: true
version: '10.0'
+ # SDK 10.0.302 contains runtime 10.0.10. Keep this aligned with DotNetRuntimePackageVersion in Directory.Packages.props.
+ exactVersion: '10.0.302'
- ${{ if eq(parameters.runTests, true) }}:
- task: VisualStudioTestPlatformInstaller@1
diff --git a/.pipelines/v2/templates/steps-ensure-dotnet-version.yml b/.pipelines/v2/templates/steps-ensure-dotnet-version.yml
index 511af33773..5e50ecf8f1 100644
--- a/.pipelines/v2/templates/steps-ensure-dotnet-version.yml
+++ b/.pipelines/v2/templates/steps-ensure-dotnet-version.yml
@@ -2,6 +2,9 @@ parameters:
- name: version
type: string
default: "10.0"
+- name: exactVersion
+ type: string
+ default: ""
- name: sdk
type: boolean
default: false
@@ -21,7 +24,12 @@ steps:
exit 1
}
$NEW_DOTNET_ROOT = "$(Agent.ToolsDirectory)\dotnet"
- & ./dotnet-install.ps1 -Channel "${{parameters.version}}" -InstallDir $NEW_DOTNET_ROOT
+ $EXACT_VERSION = "${{parameters.exactVersion}}"
+ if ([string]::IsNullOrWhiteSpace($EXACT_VERSION)) {
+ & ./dotnet-install.ps1 -Channel "${{parameters.version}}" -InstallDir $NEW_DOTNET_ROOT
+ } else {
+ & ./dotnet-install.ps1 -Version $EXACT_VERSION -InstallDir $NEW_DOTNET_ROOT
+ }
Write-Host "##vso[task.setvariable variable=DOTNET_ROOT]${NEW_DOTNET_ROOT}"
Write-Host "##vso[task.prependpath]${NEW_DOTNET_ROOT}"
Remove-Item dotnet-install.ps1 -ErrorAction:Ignore
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 2dd2a190ab..0dd306b407 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,6 +3,8 @@
true
true
3.8.3
+
+ 10.0.10
@@ -41,21 +43,21 @@
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -66,9 +68,9 @@
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+