diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml
index 9bcb4699e93a..3d823e234dc6 100644
--- a/.azure/pipelines/ci-public.yml
+++ b/.azure/pipelines/ci-public.yml
@@ -446,7 +446,7 @@ stages:
jobName: Linux_musl_x64_build
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
- container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
+ container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64
buildArgs:
--arch x64
--os-name linux-musl
@@ -480,7 +480,7 @@ stages:
jobDisplayName: "Build: Linux Musl ARM"
agentOs: Linux
useHostedUbuntu: false
- container: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine
+ container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64
buildArgs:
--arch arm
--os-name linux-musl
@@ -513,7 +513,7 @@ stages:
jobDisplayName: "Build: Linux Musl ARM64"
agentOs: Linux
useHostedUbuntu: false
- container: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine
+ container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64
buildArgs:
--arch arm64
--os-name linux-musl
@@ -645,7 +645,7 @@ stages:
parameters:
platform:
name: 'Managed'
- container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8'
+ container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64'
buildScript: './eng/build.sh --publish --no-build-repo-tasks $(_PublishArgs) $(_InternalRuntimeDownloadArgs)'
skipPublishValidation: true
jobProperties:
diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index d9f2afd0e9b6..08eab9052b12 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -97,14 +97,14 @@ variables:
- name: WindowsArm64InstallersLogArgs
value: /bl:artifacts/log/Release/Build.Installers.Arm64.binlog
- name: _InternalRuntimeDownloadArgs
- value: -RuntimeSourceFeed https://dotnetbuilds.blob.core.windows.net/internal
+ value: -RuntimeSourceFeed https://ci.dot.net/internal
-RuntimeSourceFeedKey $(dotnetbuilds-internal-container-read-token-base64)
/p:DotNetAssetRootAccessTokenSuffix='$(dotnetbuilds-internal-container-read-token-base64)'
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have to be passed directly. This
# is awkward but necessary because the eng/common/ build scripts don't add the msbuild properties automatically.
- name: _InternalRuntimeDownloadCodeSignArgs
value: $(_InternalRuntimeDownloadArgs)
- /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
+ /p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
- group: DotNet-HelixApi-Access
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
@@ -149,12 +149,8 @@ extends:
tsa:
enabled: true
containers:
- alpine319WithNode:
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode
- mariner20CrossArmAlpine:
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine
- mariner20CrossArm64Alpine:
- image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine
+ azureLinux30Net9BuildAmd64:
+ image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-build-amd64
stages:
- stage: build
displayName: Build
@@ -515,7 +511,7 @@ extends:
jobName: Linux_musl_x64_build
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
- container: alpine319WithNode
+ container: azureLinux30Net9BuildAmd64
buildArgs:
--arch x64
--os-name linux-musl
@@ -549,7 +545,7 @@ extends:
jobDisplayName: "Build: Linux Musl ARM"
agentOs: Linux
useHostedUbuntu: false
- container: mariner20CrossArmAlpine
+ container: azureLinux30Net9BuildAmd64
buildArgs:
--arch arm
--os-name linux-musl
@@ -582,7 +578,7 @@ extends:
jobDisplayName: "Build: Linux Musl ARM64"
agentOs: Linux
useHostedUbuntu: false
- container: mariner20CrossArm64Alpine
+ container: azureLinux30Net9BuildAmd64
buildArgs:
--arch arm64
--os-name linux-musl
diff --git a/.azure/pipelines/identitymodel-helix-matrix.yml b/.azure/pipelines/identitymodel-helix-matrix.yml
index 9159fe350b7e..48bba5e63274 100644
--- a/.azure/pipelines/identitymodel-helix-matrix.yml
+++ b/.azure/pipelines/identitymodel-helix-matrix.yml
@@ -26,7 +26,7 @@ resources:
ref: refs/tags/release
extends:
- template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
+ template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
parameters:
sdl:
sourceAnalysisPool:
diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml
index 65307d5d0ad7..15cf2272358c 100644
--- a/.azure/pipelines/jobs/default-build.yml
+++ b/.azure/pipelines/jobs/default-build.yml
@@ -109,10 +109,10 @@ jobs:
vmImage: macOS-13
${{ if eq(parameters.agentOs, 'Linux') }}:
${{ if eq(parameters.useHostedUbuntu, true) }}:
- vmImage: ubuntu-20.04
+ vmImage: ubuntu-22.04
${{ else }}:
name: $(DncEngPublicBuildPool)
- demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open
+ demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
${{ if eq(parameters.agentOs, 'Windows') }}:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64.open
@@ -327,7 +327,7 @@ jobs:
os: macOS
${{ if eq(parameters.agentOs, 'Linux') }}:
name: $(DncEngInternalBuildPool)
- image: 1es-ubuntu-2004
+ image: 1es-ubuntu-2204
os: linux
${{ if eq(parameters.agentOs, 'Windows') }}:
name: $(DncEngInternalBuildPool)
diff --git a/NuGet.config b/NuGet.config
index 9fa908668f8f..cabc4d8508a0 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,10 @@
-
+
-
+
@@ -30,10 +30,10 @@
-
+
-
+
diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props
index f566358b9acb..c028a1e628ea 100644
--- a/eng/Baseline.Designer.props
+++ b/eng/Baseline.Designer.props
@@ -2,117 +2,117 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
@@ -120,279 +120,279 @@
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
-
-
-
+
+
+
+
+
- 9.0.0
+ 9.0.9
-
-
-
-
-
+
+
+
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
-
-
-
-
+
+
+
+
+
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
-
+
-
+
- 9.0.0
+ 9.0.9
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
-
-
+
+
-
-
+
+
- 9.0.0
+ 9.0.9
-
+
-
+
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
@@ -401,83 +401,83 @@
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
-
+
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
@@ -493,510 +493,510 @@
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
+
+
-
-
+
+
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
-
+
-
-
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
-
+
-
+
-
+
- 9.0.0
+ 9.0.9
-
+
-
+
-
+
- 9.0.0
+ 9.0.9
-
+
-
+
-
+
- 9.0.0
+ 9.0.9
-
-
-
-
+
+
+
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
+
+
-
-
+
+
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
-
-
+
+
-
-
+
+
-
-
+
+
- 9.0.0
+ 9.0.9
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
-
+
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
- 9.0.0
+ 9.0.9
- 9.0.0
+ 9.0.9
-
+
- 9.0.0
+ 9.0.9
-
+
\ No newline at end of file
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index 1b4ce55e8e33..3ebda983fc82 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -4,110 +4,110 @@ This file contains a list of all the packages and their versions which were rele
Update this list when preparing for a new patch.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/SourceBuildPrebuiltBaseline.xml b/eng/SourceBuildPrebuiltBaseline.xml
index 8e86375464ef..2c8d20d3234b 100644
--- a/eng/SourceBuildPrebuiltBaseline.xml
+++ b/eng/SourceBuildPrebuiltBaseline.xml
@@ -46,6 +46,13 @@
+
+
+
+
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index b87535c6b679..72b4a55be806 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,334 +9,334 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 480480b57cd6e43fe5cab1b552ac0ef917bf3fe8
+ 5452ff90a79084afd23df379388ae8bca24284f3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://github.com/dotnet/xdt
- 1a54480f52703fb45fac2a6b955247d33758383e
+ 63ae81154c50a1cf9287cc47d8351d55b4289e6d
-
+
https://github.com/dotnet/xdt
- 1a54480f52703fb45fac2a6b955247d33758383e
+ 63ae81154c50a1cf9287cc47d8351d55b4289e6d
@@ -367,60 +367,60 @@
bc1c3011064a493b0ca527df6fb7215e2e5cfa96
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
-
+
https://github.com/dotnet/source-build-externals
- c65b1c1affed1f4847f9c3f81623dfa929d21e1a
+ ab469606a3e6b026dcac301e2dab96117c94faeb
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c8acea22626efab11c13778c028975acdc34678f
+ e1f19886fe3354963a4a790c896b3f99689fd7a5
https://github.com/dotnet/winforms
9b822fd70005bf5632d12fe76811b97b3dd044e4
-
+
https://github.com/dotnet/arcade
- b41381d5cd633471265e9cd72e933a7048e03062
+ 43df065432cbc74c0fa44d7569a0c31f64883f03
-
+
https://github.com/dotnet/arcade
- b41381d5cd633471265e9cd72e933a7048e03062
+ 43df065432cbc74c0fa44d7569a0c31f64883f03
-
+
https://github.com/dotnet/arcade
- b41381d5cd633471265e9cd72e933a7048e03062
+ 43df065432cbc74c0fa44d7569a0c31f64883f03
-
+
https://github.com/dotnet/arcade
- b41381d5cd633471265e9cd72e933a7048e03062
+ 43df065432cbc74c0fa44d7569a0c31f64883f03
-
+
https://github.com/dotnet/arcade
- b41381d5cd633471265e9cd72e933a7048e03062
+ 43df065432cbc74c0fa44d7569a0c31f64883f03
-
+
https://github.com/dotnet/arcade
- b41381d5cd633471265e9cd72e933a7048e03062
+ 43df065432cbc74c0fa44d7569a0c31f64883f03
-
+
https://github.com/dotnet/extensions
- cfed375f3161f2e553e946b4f968b818e8e858f1
+ 3645ccc33d29294341654cc37d0c448ed47c836c
-
+
https://github.com/dotnet/extensions
- cfed375f3161f2e553e946b4f968b818e8e858f1
+ 3645ccc33d29294341654cc37d0c448ed47c836c
https://github.com/nuget/nuget.client
diff --git a/eng/Versions.props b/eng/Versions.props
index 3d2831de877a..910f240ecf2a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,7 +8,7 @@
9
0
- 1
+ 10
true
@@ -19,8 +19,8 @@
-->
true
release
- rtm
- RTM
+ servicing
+ Servicing
true
false
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)
@@ -68,92 +68,92 @@
-->
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1-servicing.24610.10
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1-servicing.24610.10
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1-servicing.24610.10
- 9.0.1-servicing.24610.10
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10-servicing.25475.15
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10-servicing.25475.15
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10-servicing.25475.15
+ 9.0.10-servicing.25475.15
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
- 9.0.1-servicing.24610.10
- 9.0.1
+ 9.0.10-servicing.25475.15
+ 9.0.10
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
- 9.1.0-preview.1.24575.1
- 9.1.0-preview.1.24575.1
+ 9.10.0-preview.1.25456.3
+ 9.10.0-preview.1.25456.3
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
- 9.0.1
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
+ 9.0.10
4.11.0-3.24554.2
4.11.0-3.24554.2
@@ -166,12 +166,12 @@
6.2.4
6.2.4
- 9.0.0-beta.24572.2
- 9.0.0-beta.24572.2
- 9.0.0-beta.24572.2
- 9.0.0-beta.24572.2
+ 9.0.0-beta.25460.1
+ 9.0.0-beta.25460.1
+ 9.0.0-beta.25460.1
+ 9.0.0-beta.25460.1
- 9.0.0-alpha.1.24568.2
+ 9.0.0-alpha.1.24575.1
9.0.0-alpha.1.24413.1
@@ -179,8 +179,8 @@
9.0.0-rtm.24512.2
- 9.0.0-preview.24522.2
- 9.0.0-preview.24522.2
+ 10.0.0-preview.24609.2
+ 10.0.0-preview.24609.2
1.1.1
- 17.4.0
+ 17.8.29
1.2.0
- 17.4.0
- 17.4.0
- 17.4.0
+ 17.8.29
+ 17.8.29
+ 17.8.29
1.2.6
- 17.4.0
diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1
index 90b58e32a87b..a261517ef906 100644
--- a/eng/common/post-build/publish-using-darc.ps1
+++ b/eng/common/post-build/publish-using-darc.ps1
@@ -5,7 +5,8 @@ param(
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net',
[Parameter(Mandatory=$true)][string] $WaitPublishingFinish,
[Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters,
- [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters
+ [Parameter(Mandatory=$false)][string] $SymbolPublishingAdditionalParameters,
+ [Parameter(Mandatory=$false)][string] $RequireDefaultChannels
)
try {
@@ -33,6 +34,10 @@ try {
if ("false" -eq $WaitPublishingFinish) {
$optionalParams.Add("--no-wait") | Out-Null
}
+
+ if ("true" -eq $RequireDefaultChannels) {
+ $optionalParams.Add("--default-channels-required") | Out-Null
+ }
& $darc add-build-to-channel `
--id $buildId `
diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md
index 5ef6c30ba924..4bf4cf41bd7c 100644
--- a/eng/common/template-guidance.md
+++ b/eng/common/template-guidance.md
@@ -50,14 +50,14 @@ extends:
- task: CopyFiles@2
displayName: Gather build output
inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel'
+ SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel'
```
Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`).
-# Development notes
+## Development notes
**Folder / file structure**
diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml
index 605692d2fb77..81ea7a261f2d 100644
--- a/eng/common/templates-official/job/job.yml
+++ b/eng/common/templates-official/job/job.yml
@@ -3,7 +3,7 @@ parameters:
enableSbom: true
runAsPublic: false
PackageVersion: 9.0.0
- BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+ BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
jobs:
- template: /eng/common/core-templates/job/job.yml
@@ -16,6 +16,7 @@ jobs:
parameters:
PackageVersion: ${{ parameters.packageVersion }}
BuildDropPath: ${{ parameters.buildDropPath }}
+ ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
publishArtifacts: false
# publish artifacts
diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml
index dbdd66d4a4b3..f1311bbb1b33 100644
--- a/eng/common/templates-official/variables/sdl-variables.yml
+++ b/eng/common/templates-official/variables/sdl-variables.yml
@@ -4,4 +4,4 @@ variables:
- name: DefaultGuardianVersion
value: 0.109.0
- name: GuardianPackagesConfigFile
- value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
\ No newline at end of file
+ value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config
\ No newline at end of file
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index d1aeb92fcea5..5bdd3dd85fd2 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -6,7 +6,7 @@ parameters:
enableSbom: true
runAsPublic: false
PackageVersion: 9.0.0
- BuildDropPath: '$(Build.SourcesDirectory)/artifacts'
+ BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
jobs:
- template: /eng/common/core-templates/job/job.yml
@@ -75,7 +75,7 @@ jobs:
parameters:
is1ESPipeline: false
args:
- targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration'
+ targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration'
artifactName: 'BuildConfiguration'
displayName: 'Publish build retry configuration'
continueOnError: true
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index aa94fb174596..9b3ad8840fdb 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -42,7 +42,7 @@
[bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true }
# Enable repos to use a particular version of the on-line dotnet-install scripts.
-# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
+# default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
# True to use global NuGet cache instead of restoring packages to repository-local directory.
@@ -262,7 +262,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
- $uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
+ $uri = "https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
Retry({
Write-Host "GET $uri"
@@ -320,7 +320,7 @@ function InstallDotNet([string] $dotnetRoot,
$variations += @($installParameters)
$dotnetBuilds = $installParameters.Clone()
- $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public"
+ $dotnetbuilds.AzureFeed = "https://ci.dot.net/public"
$variations += @($dotnetBuilds)
if ($runtimeSourceFeed) {
@@ -416,7 +416,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
# Locate Visual Studio installation or download x-copy msbuild.
$vsInfo = LocateVisualStudio $vsRequirements
- if ($vsInfo -ne $null) {
+ if ($vsInfo -ne $null -and $env:ForceUseXCopyMSBuild -eq $null) {
# Ensure vsInstallDir has a trailing slash
$vsInstallDir = Join-Path $vsInfo.installationPath "\"
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 00473c9f918d..01b09b65796c 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -54,7 +54,7 @@ warn_as_error=${warn_as_error:-true}
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
# Enable repos to use a particular version of the on-line dotnet-install scripts.
-# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
+# default URL: https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh
dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'}
# True to use global NuGet cache instead of restoring packages to repository-local directory.
@@ -232,7 +232,7 @@ function InstallDotNet {
local public_location=("${installParameters[@]}")
variations+=(public_location)
- local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public")
+ local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public")
variations+=(dotnetbuilds)
if [[ -n "${6:-}" ]]; then
@@ -295,7 +295,7 @@ function with_retries {
function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
- local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
+ local install_script_url="https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
if [[ ! -a "$install_script" ]]; then
mkdir -p "$root"
diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj
index f31e201d516e..a772993a3592 100644
--- a/eng/helix/helix.proj
+++ b/eng/helix/helix.proj
@@ -58,12 +58,12 @@
runtime
-
$([System.Environment]::GetEnvironmentVariable('DotNetBuildsInternalReadSasToken'))
-
$([System.Environment]::GetEnvironmentVariable('DotNetBuildsInternalReadSasToken'))
diff --git a/eng/scripts/InstallJdk.ps1 b/eng/scripts/InstallJdk.ps1
index 0872f241a982..1ba711b5eaa4 100644
--- a/eng/scripts/InstallJdk.ps1
+++ b/eng/scripts/InstallJdk.ps1
@@ -22,8 +22,7 @@ $installDir = "$repoRoot\.tools\jdk\win-x64\"
$javacExe = "$installDir\bin\javac.exe"
$tempDir = "$repoRoot\obj"
if (-not $JdkVersion) {
- $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
- $JdkVersion = $globalJson.'native-tools'.jdk
+ $JdkVersion = "11.0.24"
}
if (Test-Path $javacExe) {
diff --git a/eng/scripts/install-nginx-linux.sh b/eng/scripts/install-nginx-linux.sh
index bbfb79c48203..f075a899d1cf 100755
--- a/eng/scripts/install-nginx-linux.sh
+++ b/eng/scripts/install-nginx-linux.sh
@@ -6,7 +6,7 @@ scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
reporoot="$(dirname "$(dirname "$scriptroot")")"
nginxinstall="$reporoot/.tools/nginx"
-curl -sSL http://nginx.org/download/nginx-1.14.2.tar.gz --retry 5 | tar zxfv - -C /tmp && cd /tmp/nginx-1.14.2/
+curl -sSL http://nginx.org/download/nginx-1.26.3.tar.gz --retry 5 | tar zxfv - -C /tmp && cd /tmp/nginx-1.26.3/
./configure --prefix=$nginxinstall --with-http_ssl_module --without-http_rewrite_module
make
make install
diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props
index cedd59cd34ad..1ba8ba99dbe3 100644
--- a/eng/targets/Helix.Common.props
+++ b/eng/targets/Helix.Common.props
@@ -2,9 +2,9 @@
(AlmaLinux.8.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-helix-amd64
- (Alpine.318.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.18-helix-amd64
+ (Alpine.321.Amd64.Open)azurelinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64
(Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64
- (Fedora.38.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix
+ (Fedora.41.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41-helix
(Mariner)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64
(Debian.12.Arm64.Open)ubuntu.2204.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm64v8
@@ -29,7 +29,7 @@
-
+
@@ -42,14 +42,14 @@
-
+
-
+
-
+
diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets
index 43bf0cb7f7f1..0aab28ef20cc 100644
--- a/eng/targets/Helix.targets
+++ b/eng/targets/Helix.targets
@@ -17,9 +17,9 @@
$(HelixQueueAlmaLinux8);
- $(HelixQueueAlpine318);
+ $(HelixQueueAlpine);
$(HelixQueueDebian12);
- $(HelixQueueFedora38);
+ $(HelixQueueFedora40);
$(HelixQueueMariner);
Ubuntu.2004.Amd64.Open;
diff --git a/global.json b/global.json
index e4674ed713f8..25bf23883f5d 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "9.0.100"
+ "version": "9.0.110"
},
"tools": {
- "dotnet": "9.0.100",
+ "dotnet": "9.0.110",
"runtimes": {
"dotnet/x86": [
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
@@ -24,10 +24,10 @@
"xcopy-msbuild": "17.1.0"
},
"native-tools": {
- "jdk": "11.0.24"
+ "jdk": "latest"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24572.2",
- "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24572.2"
+ "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25460.1",
+ "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25460.1"
}
}
diff --git a/src/Caching/StackExchangeRedis/src/RedisCache.cs b/src/Caching/StackExchangeRedis/src/RedisCache.cs
index debec0237040..95bba7dd0088 100644
--- a/src/Caching/StackExchangeRedis/src/RedisCache.cs
+++ b/src/Caching/StackExchangeRedis/src/RedisCache.cs
@@ -53,6 +53,8 @@ private static RedisValue[] GetHashFields(bool getData) => getData
private long _firstErrorTimeTicks;
private long _previousErrorTimeTicks;
+ internal virtual bool IsHybridCacheActive() => false;
+
// StackExchange.Redis will also be trying to reconnect internally,
// so limit how often we recreate the ConnectionMultiplexer instance
// in an attempt to reconnect
@@ -375,6 +377,11 @@ private void TryAddSuffix(IConnectionMultiplexer connection)
{
connection.AddLibraryNameSuffix("aspnet");
connection.AddLibraryNameSuffix("DC");
+
+ if (IsHybridCacheActive())
+ {
+ connection.AddLibraryNameSuffix("HC");
+ }
}
catch (Exception ex)
{
diff --git a/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs b/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs
index dab5bfc8655b..0a58d43e136d 100644
--- a/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs
+++ b/src/Caching/StackExchangeRedis/src/RedisCacheImpl.cs
@@ -1,6 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
+using Microsoft.Extensions.Caching.Hybrid;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@@ -8,13 +11,20 @@ namespace Microsoft.Extensions.Caching.StackExchangeRedis;
internal sealed class RedisCacheImpl : RedisCache
{
- public RedisCacheImpl(IOptions optionsAccessor, ILogger logger)
+ private readonly IServiceProvider _services;
+
+ internal override bool IsHybridCacheActive()
+ => _services.GetService() is not null;
+
+ public RedisCacheImpl(IOptions optionsAccessor, ILogger logger, IServiceProvider services)
: base(optionsAccessor, logger)
{
+ _services = services; // important: do not check for HybridCache here due to dependency - creates a cycle
}
- public RedisCacheImpl(IOptions optionsAccessor)
+ public RedisCacheImpl(IOptions optionsAccessor, IServiceProvider services)
: base(optionsAccessor)
{
+ _services = services; // important: do not check for HybridCache here due to dependency - creates a cycle
}
}
diff --git a/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs b/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs
index 29a49a7cec70..71e31d19928a 100644
--- a/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs
+++ b/src/Caching/StackExchangeRedis/test/CacheServiceExtensionsTests.cs
@@ -1,11 +1,19 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
+using System.Collections.Generic;
using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
using Microsoft.Extensions.Caching.Distributed;
+using Microsoft.Extensions.Caching.Hybrid;
+using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
+using Microsoft.Extensions.Options;
using Moq;
using Xunit;
@@ -121,4 +129,71 @@ public void AddStackExchangeRedisCache_UsesLoggerFactoryAlreadyRegisteredWithSer
loggerFactory.Verify();
}
+
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void AddStackExchangeRedisCache_HybridCacheDetected(bool hybridCacheActive)
+ {
+ // Arrange
+ var services = new ServiceCollection();
+
+ services.AddLogging();
+
+ // Act
+ services.AddStackExchangeRedisCache(options => { });
+ if (hybridCacheActive)
+ {
+ services.AddMemoryCache();
+ services.TryAddSingleton();
+ }
+
+ using var provider = services.BuildServiceProvider();
+ var cache = Assert.IsAssignableFrom(provider.GetRequiredService());
+ Assert.Equal(hybridCacheActive, cache.IsHybridCacheActive());
+ }
+
+ sealed class DummyHybridCache : HybridCache
+ {
+ // emulate the layout from HybridCache in dotnet/extensions
+ public DummyHybridCache(IOptions options, IServiceProvider services)
+ {
+ if (services is null)
+ {
+ throw new ArgumentNullException(nameof(services));
+ }
+
+ var l1 = services.GetRequiredService();
+ _ = options.Value;
+ var logger = services.GetService()?.CreateLogger(typeof(HybridCache)) ?? NullLogger.Instance;
+ // var clock = services.GetService() ?? TimeProvider.System;
+ var l2 = services.GetService(); // note optional
+
+ // ignore L2 if it is really just the same L1, wrapped
+ // (note not just an "is" test; if someone has a custom subclass, who knows what it does?)
+ if (l2 is not null
+ && l2.GetType() == typeof(MemoryDistributedCache)
+ && l1.GetType() == typeof(MemoryCache))
+ {
+ l2 = null;
+ }
+
+ IHybridCacheSerializerFactory[] factories = services.GetServices().ToArray();
+ Array.Reverse(factories);
+ }
+
+ public class HybridCacheOptions { }
+
+ public override ValueTask GetOrCreateAsync(string key, TState state, Func> factory, HybridCacheEntryOptions options = null, IEnumerable tags = null, CancellationToken cancellationToken = default)
+ => throw new NotSupportedException();
+
+ public override ValueTask RemoveAsync(string key, CancellationToken cancellationToken = default)
+ => throw new NotSupportedException();
+
+ public override ValueTask RemoveByTagAsync(string tag, CancellationToken cancellationToken = default)
+ => throw new NotSupportedException();
+
+ public override ValueTask SetAsync(string key, T value, HybridCacheEntryOptions options = null, IEnumerable tags = null, CancellationToken cancellationToken = default)
+ => throw new NotSupportedException();
+ }
}
diff --git a/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj b/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj
index 4c5ae75fa8a4..5d27de7c059f 100644
--- a/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj
+++ b/src/Components/CustomElements/src/Microsoft.AspNetCore.Components.CustomElements.csproj
@@ -1,4 +1,4 @@
-
+
$(DefaultNetCoreTargetFramework)
@@ -18,7 +18,7 @@
-
+
<_JsBuildOutput Include="$(InteropWorkingDir)dist\$(Configuration)\**" Exclude="$(InteropWorkingDir)dist\.gitignore" />
diff --git a/src/Components/WebAssembly/DevServer/src/Server/Startup.cs b/src/Components/WebAssembly/DevServer/src/Server/Startup.cs
index 046031a29f79..a9870bf688fb 100644
--- a/src/Components/WebAssembly/DevServer/src/Server/Startup.cs
+++ b/src/Components/WebAssembly/DevServer/src/Server/Startup.cs
@@ -6,6 +6,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Net.Http.Headers;
namespace Microsoft.AspNetCore.Components.WebAssembly.DevServer.Server;
@@ -69,6 +70,14 @@ public static void Configure(IApplicationBuilder app, IConfiguration configurati
{
OnPrepareResponse = fileContext =>
{
+ // Avoid caching index.html during development.
+ // When hot reload is enabled, a middleware injects a hot reload script into the response HTML.
+ // We don't want the browser to bypass this injection by using a cached response that doesn't
+ // contain the injected script. In the future, if script injection is removed in favor of a
+ // different mechanism, we can delete this comment and the line below it.
+ // See also: https://github.com/dotnet/aspnetcore/issues/45213
+ fileContext.Context.Response.Headers[HeaderNames.CacheControl] = "no-store";
+
if (applyCopHeaders)
{
// Browser multi-threaded runtime requires cross-origin policy headers to enable SharedArrayBuffer.
diff --git a/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs
index 94b6b80f53a1..0ba10d655cdf 100644
--- a/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs
+++ b/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs
@@ -4,6 +4,7 @@
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure;
using Microsoft.AspNetCore.E2ETesting;
+using Microsoft.AspNetCore.InternalTesting;
using TestServer;
using Xunit.Abstractions;
using Components.TestServer.RazorComponents;
@@ -519,6 +520,7 @@ public void NavigationManagerUriGetsUpdatedOnEnhancedNavigation_OnlyServerOrWebA
[Theory]
[InlineData("server")]
[InlineData("wasm")]
+ [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/61143")]
public void NavigationManagerUriGetsUpdatedOnEnhancedNavigation_BothServerAndWebAssembly(string runtimeThatInvokedNavigation)
{
Navigate($"{ServerPathBase}/nav");
diff --git a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs
index 4b35b0c5eed0..423b18bfc1dc 100644
--- a/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs
+++ b/src/Components/test/E2ETest/ServerRenderingTests/FormHandlingTests/FormWithParentBindingContextTest.cs
@@ -1287,7 +1287,7 @@ public void CanBindToFormWithFiles()
}
[Theory]
- [InlineData(true)]
+ // [InlineData(true)] QuarantinedTest: https://github.com/dotnet/aspnetcore/issues/61882
[InlineData(false)]
public void CanUseFormWithMethodGet(bool suppressEnhancedNavigation)
{
@@ -1344,19 +1344,19 @@ public void RadioButtonGetsResetAfterSubmittingEnhancedForm()
{
GoTo("forms/form-with-checkbox-and-radio-button");
- Assert.False(Browser.Exists(By.Id("checkbox")).Selected);
- Assert.False(Browser.Exists(By.Id("radio-button")).Selected);
+ WaitAssert.False(Browser, () => Browser.Exists(By.Id("checkbox")).Selected);
+ WaitAssert.False(Browser, () => Browser.Exists(By.Id("radio-button")).Selected);
Browser.Exists(By.Id("checkbox")).Click();
Browser.Exists(By.Id("radio-button")).Click();
- Assert.True(Browser.Exists(By.Id("checkbox")).Selected);
- Assert.True(Browser.Exists(By.Id("radio-button")).Selected);
+ WaitAssert.True(Browser, () => Browser.Exists(By.Id("checkbox")).Selected);
+ WaitAssert.True(Browser, () => Browser.Exists(By.Id("radio-button")).Selected);
Browser.Exists(By.Id("submit-button")).Click();
- Assert.False(Browser.Exists(By.Id("checkbox")).Selected);
- Assert.False(Browser.Exists(By.Id("radio-button")).Selected);
+ WaitAssert.False(Browser, () => Browser.Exists(By.Id("checkbox")).Selected);
+ WaitAssert.False(Browser, () => Browser.Exists(By.Id("radio-button")).Selected);
}
[Fact]
diff --git a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
index 48725d72139d..5f488e03a398 100644
--- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
+++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
@@ -100,12 +100,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier.Replace('.', '_'))
$(TargetOsName)
- linux
+ linux
$(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-'))))
x64
$(BuildArchitecture)
@@ -560,9 +560,9 @@ This package is an internal implementation of the .NET Core SDK and is not meant
-
-
-
+
+
$(DotnetRuntimeSourceFeedKey)
diff --git a/src/Http/Headers/test/CookieHeaderValueTest.cs b/src/Http/Headers/test/CookieHeaderValueTest.cs
index 6623a8ed13dd..6ad2e962d005 100644
--- a/src/Http/Headers/test/CookieHeaderValueTest.cs
+++ b/src/Http/Headers/test/CookieHeaderValueTest.cs
@@ -75,7 +75,7 @@ public static TheoryData InvalidCookieValues
}
}
- public static TheoryData, string?[]> ListOfCookieHeaderDataSet
+ public static TheoryData, string?[]> ListOfStrictCookieHeaderDataSet
{
get
{
@@ -94,19 +94,30 @@ public static TheoryData InvalidCookieValues
dataset.Add(new[] { header1 }.ToList(), new[] { string1 });
dataset.Add(new[] { header1, header1 }.ToList(), new[] { string1, string1 });
- dataset.Add(new[] { header1, header1 }.ToList(), new[] { string1, null, "", " ", ";", " , ", string1 });
dataset.Add(new[] { header2 }.ToList(), new[] { string2 });
dataset.Add(new[] { header1, header2 }.ToList(), new[] { string1, string2 });
- dataset.Add(new[] { header1, header2 }.ToList(), new[] { string1 + ", " + string2 });
dataset.Add(new[] { header2, header1 }.ToList(), new[] { string2 + "; " + string1 });
dataset.Add(new[] { header1, header2, header3, header4 }.ToList(), new[] { string1, string2, string3, string4 });
- dataset.Add(new[] { header1, header2, header3, header4 }.ToList(), new[] { string.Join(",", string1, string2, string3, string4) });
dataset.Add(new[] { header1, header2, header3, header4 }.ToList(), new[] { string.Join(";", string1, string2, string3, string4) });
return dataset;
}
}
+ public static TheoryData, string?[]> ListOfCookieHeaderDataSet
+ {
+ get
+ {
+ var header1 = new CookieHeaderValue("name1", "n1=v1&n2=v2&n3=v3");
+ var string1 = "name1=n1=v1&n2=v2&n3=v3";
+
+ var dataset = new TheoryData, string?[]>();
+ dataset.Concat(ListOfStrictCookieHeaderDataSet);
+ dataset.Add(new[] { header1, header1 }.ToList(), new[] { string1, null, "", " ", ";", " , ", string1 });
+ return dataset;
+ }
+ }
+
public static TheoryData?, string?[]> ListWithInvalidCookieHeaderDataSet
{
get
@@ -127,18 +138,19 @@ public static TheoryData InvalidCookieValues
dataset.Add(new[] { header1 }.ToList(), new[] { validString1, invalidString1 });
dataset.Add(new[] { header1 }.ToList(), new[] { validString1, null, "", " ", ";", " , ", invalidString1 });
dataset.Add(new[] { header1 }.ToList(), new[] { invalidString1, null, "", " ", ";", " , ", validString1 });
- dataset.Add(new[] { header1 }.ToList(), new[] { validString1 + ", " + invalidString1 });
- dataset.Add(new[] { header2 }.ToList(), new[] { invalidString1 + ", " + validString2 });
+ dataset.Add(null, new[] { validString1 + ", " });
+ dataset.Add(null, new[] { invalidString1 + ", " + validString2 });
dataset.Add(new[] { header1 }.ToList(), new[] { invalidString1 + "; " + validString1 });
dataset.Add(new[] { header2 }.ToList(), new[] { validString2 + "; " + invalidString1 });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { invalidString1, validString1, validString2, validString3 });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { validString1, invalidString1, validString2, validString3 });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { validString1, validString2, invalidString1, validString3 });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { validString1, validString2, validString3, invalidString1 });
- dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", invalidString1, validString1, validString2, validString3) });
- dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", validString1, invalidString1, validString2, validString3) });
- dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", validString1, validString2, invalidString1, validString3) });
- dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(",", validString1, validString2, validString3, invalidString1) });
+ dataset.Add(null, new[] { string.Join(",", invalidString1, validString1, validString2, validString3) });
+ dataset.Add(null, new[] { string.Join(",", validString1, invalidString1, validString2, validString3) });
+ dataset.Add(null, new[] { string.Join(",", validString1, validString2, invalidString1, validString3) });
+ dataset.Add(null, new[] { string.Join(",", validString1, validString2, validString3, invalidString1) });
+ dataset.Add(null, new[] { string.Join(",", validString1, validString2, validString3) });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(";", invalidString1, validString1, validString2, validString3) });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(";", validString1, invalidString1, validString2, validString3) });
dataset.Add(new[] { header1, header2, header3 }.ToList(), new[] { string.Join(";", validString1, validString2, invalidString1, validString3) });
@@ -248,7 +260,7 @@ public void CookieHeaderValue_ParseList_AcceptsValidValues(IList cookies, string[] input)
{
var results = CookieHeaderValue.ParseStrictList(input);
@@ -267,7 +279,7 @@ public void CookieHeaderValue_TryParseList_AcceptsValidValues(IList cookies, string[] input)
{
var result = CookieHeaderValue.TryParseStrictList(input, out var results);
diff --git a/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs b/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs
index 33ecc3ff1ea8..b4071866534b 100644
--- a/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs
+++ b/src/Http/Http.Extensions/test/HeaderDictionaryTypeExtensionsTest.cs
@@ -214,7 +214,7 @@ public void GetListT_StringWithQualityHeaderValidValue_Success()
public void GetListT_CookieHeaderValue_Success()
{
var context = new DefaultHttpContext();
- context.Request.Headers.Cookie = "cookie1=a,cookie2=b";
+ context.Request.Headers.Cookie = "cookie1=a;cookie2=b";
var result = context.Request.GetTypedHeaders().GetList(HeaderNames.Cookie);
diff --git a/src/Http/Http/test/RequestCookiesCollectionTests.cs b/src/Http/Http/test/RequestCookiesCollectionTests.cs
index e08a53f29711..d584f2db0599 100644
--- a/src/Http/Http/test/RequestCookiesCollectionTests.cs
+++ b/src/Http/Http/test/RequestCookiesCollectionTests.cs
@@ -33,11 +33,18 @@ public void ParseManyCookies()
[Theory]
[InlineData(",", null)]
[InlineData(";", null)]
- [InlineData("er=dd,cc,bb", new[] { "dd" })]
- [InlineData("er=dd,err=cc,errr=bb", new[] { "dd", "cc", "bb" })]
- [InlineData("errorcookie=dd,:(\"sa;", new[] { "dd" })]
+ [InlineData("er=dd,cc,bb", null)]
+ [InlineData("er=dd,err=cc,errr=bb", null)]
+ [InlineData("errorcookie=dd,:(\"sa;", null)]
[InlineData("s;", null)]
[InlineData("er=;,err=,errr=\\,errrr=\"", null)]
+ [InlineData("a@a=a;", null)]
+ [InlineData("a@ a=a;", null)]
+ [InlineData("a a=a;", null)]
+ [InlineData(",a=a;", null)]
+ [InlineData(",a=a", null)]
+ [InlineData("a=a;,b=b", new []{ "a" })] // valid cookie followed by invalid cookie
+ [InlineData(",a=a;b=b", new[] { "b" })] // invalid cookie followed by valid cookie
public void ParseInvalidCookies(string cookieToParse, string[] expectedCookieValues)
{
var cookies = RequestCookieCollection.Parse(new StringValues(new[] { cookieToParse }));
diff --git a/src/Http/Shared/CookieHeaderParserShared.cs b/src/Http/Shared/CookieHeaderParserShared.cs
index e4b1d83e519a..0eb1c64d533a 100644
--- a/src/Http/Shared/CookieHeaderParserShared.cs
+++ b/src/Http/Shared/CookieHeaderParserShared.cs
@@ -89,6 +89,17 @@ public static bool TryParseValue(StringSegment value, ref int index, bool suppor
if (!TryGetCookieLength(value, ref current, out parsedName, out parsedValue))
{
+ var separatorIndex = value.IndexOf(';', current);
+ if (separatorIndex > 0)
+ {
+ // Skip the invalid values and keep trying.
+ index = separatorIndex;
+ }
+ else
+ {
+ // No more separators, so we're done.
+ index = value.Length;
+ }
return false;
}
@@ -97,6 +108,17 @@ public static bool TryParseValue(StringSegment value, ref int index, bool suppor
// If we support multiple values and we've not reached the end of the string, then we must have a separator.
if ((separatorFound && !supportsMultipleValues) || (!separatorFound && (current < value.Length)))
{
+ var separatorIndex = value.IndexOf(';', current);
+ if (separatorIndex > 0)
+ {
+ // Skip the invalid values and keep trying.
+ index = separatorIndex;
+ }
+ else
+ {
+ // No more separators, so we're done.
+ index = value.Length;
+ }
return false;
}
@@ -112,7 +134,7 @@ private static int GetNextNonEmptyOrWhitespaceIndex(StringSegment input, int sta
separatorFound = false;
var current = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex);
- if ((current == input.Length) || (input[current] != ',' && input[current] != ';'))
+ if (current == input.Length || input[current] != ';')
{
return current;
}
@@ -125,8 +147,8 @@ private static int GetNextNonEmptyOrWhitespaceIndex(StringSegment input, int sta
if (skipEmptyValues)
{
- // Most headers only split on ',', but cookies primarily split on ';'
- while ((current < input.Length) && ((input[current] == ',') || (input[current] == ';')))
+ // Cookies are split on ';'
+ while (current < input.Length && input[current] == ';')
{
current++; // skip delimiter.
current = current + HttpRuleParser.GetWhitespaceLength(input, current);
@@ -136,6 +158,18 @@ private static int GetNextNonEmptyOrWhitespaceIndex(StringSegment input, int sta
return current;
}
+ /*
+ * https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1
+ * cookie-pair = cookie-name "=" cookie-value
+ * cookie-name = token
+ * token = 1*
+ separators = "(" | ")" | "<" | ">" | "@"
+ | "," | ";" | ":" | "\" | <">
+ | "/" | "[" | "]" | "?" | "="
+ | "{" | "}" | SP | HT
+ CTL =
+ */
// name=value; name="value"
internal static bool TryGetCookieLength(StringSegment input, ref int offset, [NotNullWhen(true)] out StringSegment? parsedName, [NotNullWhen(true)] out StringSegment? parsedValue)
{
diff --git a/src/Http/WebUtilities/src/MultipartReaderStream.cs b/src/Http/WebUtilities/src/MultipartReaderStream.cs
index 208d1b38f0e0..9dd5ce6a76f8 100644
--- a/src/Http/WebUtilities/src/MultipartReaderStream.cs
+++ b/src/Http/WebUtilities/src/MultipartReaderStream.cs
@@ -174,7 +174,7 @@ public override int Read(byte[] buffer, int offset, int count)
if (index != 0)
{
// Sync, it's already buffered
- var slice = buffer.AsSpan(0, Math.Min(buffer.Length, index));
+ var slice = buffer.AsSpan(offset, Math.Min(count, index));
var readAmount = _innerStream.Read(slice);
return UpdatePosition(readAmount);
diff --git a/src/Http/WebUtilities/test/MultipartReaderTests.cs b/src/Http/WebUtilities/test/MultipartReaderTests.cs
index 8231ec472bc0..bc442b567dc0 100644
--- a/src/Http/WebUtilities/test/MultipartReaderTests.cs
+++ b/src/Http/WebUtilities/test/MultipartReaderTests.cs
@@ -389,4 +389,28 @@ public async Task MultipartReader_StripQuotesFromBoundary()
var section = await reader.ReadNextSectionAsync();
Assert.NotNull(section);
}
+
+ [Fact]
+ public async Task SyncReadWithOffsetWorks()
+ {
+ var stream = MakeStream(OnePartBody);
+ var reader = new MultipartReader(Boundary, stream);
+ var buffer = new byte[5];
+
+ var section = await reader.ReadNextSectionAsync();
+ Assert.NotNull(section);
+ Assert.Single(section.Headers);
+ Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]);
+
+ var read = section.Body.Read(buffer, 2, buffer.Length - 2);
+ Assert.Equal("\0\0tex", GetString(buffer, read + 2));
+
+ read = section.Body.Read(buffer, 1, buffer.Length - 1);
+ Assert.Equal("\0t de", GetString(buffer, read + 1));
+
+ read = section.Body.Read(buffer, 0, buffer.Length);
+ Assert.Equal("fault", GetString(buffer, read));
+
+ Assert.Null(await reader.ReadNextSectionAsync());
+ }
}
diff --git a/src/Identity/Core/src/SignInManager.cs b/src/Identity/Core/src/SignInManager.cs
index b5659b329854..66f06c4d3465 100644
--- a/src/Identity/Core/src/SignInManager.cs
+++ b/src/Identity/Core/src/SignInManager.cs
@@ -162,8 +162,21 @@ public virtual async Task CanSignInAsync(TUser user)
public virtual async Task RefreshSignInAsync(TUser user)
{
var auth = await Context.AuthenticateAsync(AuthenticationScheme);
- IList claims = Array.Empty();
+ if (!auth.Succeeded || auth.Principal?.Identity?.IsAuthenticated != true)
+ {
+ Logger.LogError("RefreshSignInAsync prevented because the user is not currently authenticated. Use SignInAsync instead for initial sign in.");
+ return;
+ }
+ var authenticatedUserId = UserManager.GetUserId(auth.Principal);
+ var newUserId = await UserManager.GetUserIdAsync(user);
+ if (authenticatedUserId == null || authenticatedUserId != newUserId)
+ {
+ Logger.LogError("RefreshSignInAsync prevented because currently authenticated user has a different UserId. Use SignInAsync instead to change users.");
+ return;
+ }
+
+ IList claims = Array.Empty();
var authenticationMethod = auth?.Principal?.FindFirst(ClaimTypes.AuthenticationMethod);
var amr = auth?.Principal?.FindFirst("amr");
diff --git a/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs b/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs
index f55c2b48340d..fe7eb5ee9003 100644
--- a/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs
+++ b/src/Identity/EntityFrameworkCore/test/EF.Test/UserStoreTest.cs
@@ -144,6 +144,9 @@ await Assert.ThrowsAsync("user",
await Assert.ThrowsAsync("user", async () => await store.GetTwoFactorEnabledAsync(null));
await Assert.ThrowsAsync("user",
async () => await store.SetTwoFactorEnabledAsync(null, true));
+ await Assert.ThrowsAsync("user", async () => await store.RedeemCodeAsync(user: null, code: "fake", default));
+ await Assert.ThrowsAsync("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: null, default));
+ await Assert.ThrowsAsync("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: "", default));
await Assert.ThrowsAsync("user", async () => await store.GetAccessFailedCountAsync(null));
await Assert.ThrowsAsync("user", async () => await store.GetLockoutEnabledAsync(null));
await Assert.ThrowsAsync("user", async () => await store.SetLockoutEnabledAsync(null, false));
diff --git a/src/Identity/Extensions.Stores/src/UserStoreBase.cs b/src/Identity/Extensions.Stores/src/UserStoreBase.cs
index c45dd197e4a2..804ebcbad7dc 100644
--- a/src/Identity/Extensions.Stores/src/UserStoreBase.cs
+++ b/src/Identity/Extensions.Stores/src/UserStoreBase.cs
@@ -969,7 +969,7 @@ public virtual async Task RedeemCodeAsync(TUser user, string code, Cancell
ThrowIfDisposed();
ArgumentNullThrowHelper.ThrowIfNull(user);
- ArgumentNullThrowHelper.ThrowIfNull(code);
+ ArgumentNullThrowHelper.ThrowIfNullOrEmpty(code);
var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? "";
var splitCodes = mergedCodes.Split(';');
diff --git a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj
index a43b8e998eec..d36fe09d60c4 100644
--- a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj
+++ b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj
@@ -90,11 +90,27 @@
%(RecursiveDir)%(FileName)%(Extension)
-
-
+
+
-
+
+
@@ -106,7 +122,7 @@
>
-
+
-
-
+
+
+ Discovered
+
+
+ Discovered
+
+
+
+
+
-
+
-
+
diff --git a/src/Identity/test/Identity.Test/SignInManagerTest.cs b/src/Identity/test/Identity.Test/SignInManagerTest.cs
index d1072676138a..73fe6d6be218 100644
--- a/src/Identity/test/Identity.Test/SignInManagerTest.cs
+++ b/src/Identity/test/Identity.Test/SignInManagerTest.cs
@@ -592,38 +592,38 @@ public async Task CanExternalSignIn(bool isPersistent, bool supportsLockout)
[InlineData(true, false)]
[InlineData(false, true)]
[InlineData(false, false)]
- public async Task CanResignIn(
- // Suppress warning that says theory methods should use all of their parameters.
- // See comments below about why this isn't used.
-#pragma warning disable xUnit1026
- bool isPersistent,
-#pragma warning restore xUnit1026
- bool externalLogin)
+ public async Task CanResignIn(bool isPersistent, bool externalLogin)
{
// Setup
var user = new PocoUser { UserName = "Foo" };
var context = new DefaultHttpContext();
var auth = MockAuth(context);
var loginProvider = "loginprovider";
- var id = new ClaimsIdentity();
+ var id = new ClaimsIdentity("authscheme");
if (externalLogin)
{
id.AddClaim(new Claim(ClaimTypes.AuthenticationMethod, loginProvider));
}
- // REVIEW: auth changes we lost the ability to mock is persistent
- //var properties = new AuthenticationProperties { IsPersistent = isPersistent };
- var authResult = AuthenticateResult.NoResult();
+
+ var claimsPrincipal = new ClaimsPrincipal(id);
+ var properties = new AuthenticationProperties { IsPersistent = isPersistent };
+ var authResult = AuthenticateResult.Success(new AuthenticationTicket(claimsPrincipal, properties, "authscheme"));
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme))
.Returns(Task.FromResult(authResult)).Verifiable();
var manager = SetupUserManager(user);
+ manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns(user.Id.ToString());
var signInManager = new Mock>(manager.Object,
new HttpContextAccessor { HttpContext = context },
new Mock>().Object,
null, null, new Mock().Object, null)
{ CallBase = true };
- //signInManager.Setup(s => s.SignInAsync(user, It.Is(p => p.IsPersistent == isPersistent),
- //externalLogin? loginProvider : null)).Returns(Task.FromResult(0)).Verifiable();
- signInManager.Setup(s => s.SignInWithClaimsAsync(user, It.IsAny(), It.IsAny>())).Returns(Task.FromResult(0)).Verifiable();
+
+ signInManager.Setup(s => s.SignInWithClaimsAsync(user,
+ It.Is(properties => properties.IsPersistent == isPersistent),
+ It.Is>(claims => !externalLogin ||
+ claims.Any(claim => claim.Type == ClaimTypes.AuthenticationMethod && claim.Value == loginProvider))))
+ .Returns(Task.FromResult(0)).Verifiable();
+
signInManager.Object.Context = context;
// Act
@@ -634,6 +634,58 @@ public async Task CanResignIn(
signInManager.Verify();
}
+ [Fact]
+ public async Task ResignInNoOpsAndLogsErrorIfNotAuthenticated()
+ {
+ var user = new PocoUser { UserName = "Foo" };
+ var context = new DefaultHttpContext();
+ var auth = MockAuth(context);
+ var manager = SetupUserManager(user);
+ var logger = new TestLogger>();
+ var signInManager = new Mock>(manager.Object,
+ new HttpContextAccessor { HttpContext = context },
+ new Mock>().Object,
+ null, logger, new Mock().Object, null)
+ { CallBase = true };
+ auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme))
+ .Returns(Task.FromResult(AuthenticateResult.NoResult())).Verifiable();
+
+ await signInManager.Object.RefreshSignInAsync(user);
+
+ Assert.Contains("RefreshSignInAsync prevented because the user is not currently authenticated. Use SignInAsync instead for initial sign in.", logger.LogMessages);
+ auth.Verify();
+ signInManager.Verify(s => s.SignInWithClaimsAsync(It.IsAny(), It.IsAny(), It.IsAny>()),
+ Times.Never());
+ }
+
+ [Fact]
+ public async Task ResignInNoOpsAndLogsErrorIfAuthenticatedWithDifferentUser()
+ {
+ var user = new PocoUser { UserName = "Foo" };
+ var context = new DefaultHttpContext();
+ var auth = MockAuth(context);
+ var manager = SetupUserManager(user);
+ var logger = new TestLogger>();
+ var signInManager = new Mock>(manager.Object,
+ new HttpContextAccessor { HttpContext = context },
+ new Mock>().Object,
+ null, logger, new Mock().Object, null)
+ { CallBase = true };
+ var id = new ClaimsIdentity("authscheme");
+ var claimsPrincipal = new ClaimsPrincipal(id);
+ var authResult = AuthenticateResult.Success(new AuthenticationTicket(claimsPrincipal, new AuthenticationProperties(), "authscheme"));
+ auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.ApplicationScheme))
+ .Returns(Task.FromResult(authResult)).Verifiable();
+ manager.Setup(m => m.GetUserId(claimsPrincipal)).Returns("different");
+
+ await signInManager.Object.RefreshSignInAsync(user);
+
+ Assert.Contains("RefreshSignInAsync prevented because currently authenticated user has a different UserId. Use SignInAsync instead to change users.", logger.LogMessages);
+ auth.Verify();
+ signInManager.Verify(s => s.SignInWithClaimsAsync(It.IsAny(), It.IsAny(), It.IsAny>()),
+ Times.Never());
+ }
+
[Theory]
[InlineData(true, true, true, true)]
[InlineData(true, true, false, true)]
diff --git a/src/Installers/Debian/Directory.Build.targets b/src/Installers/Debian/Directory.Build.targets
index 2d854470f156..771ecec7da73 100644
--- a/src/Installers/Debian/Directory.Build.targets
+++ b/src/Installers/Debian/Directory.Build.targets
@@ -60,5 +60,6 @@
+
diff --git a/src/Installers/Debian/Runtime/Debian.Runtime.debproj b/src/Installers/Debian/Runtime/Debian.Runtime.debproj
index 343216335618..85391faafac4 100644
--- a/src/Installers/Debian/Runtime/Debian.Runtime.debproj
+++ b/src/Installers/Debian/Runtime/Debian.Runtime.debproj
@@ -34,6 +34,7 @@
$(RuntimeInstallerBaseName)-$(SharedFxVersion)-x64.deb
+ $(RuntimeInstallerBaseName)-$(SharedFxVersion)-newkey-x64.deb
$(TargetDir)$(TargetFileName)
$(VersionPrefix)
diff --git a/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj b/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
index 5295906837c5..4ffc3aa85fe8 100644
--- a/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
+++ b/src/Installers/Debian/TargetingPack/Debian.TargetingPack.debproj
@@ -38,6 +38,7 @@
$(TargetingPackInstallerBaseName)-$(TargetingPackVersion)-$(TargetArchitecture).deb
+ $(TargetingPackInstallerBaseName)-$(TargetingPackVersion)-newkey-$(TargetArchitecture).deb
$(TargetDir)$(TargetFileName)
$(TargetingPackVersionPrefix)
diff --git a/src/Installers/Rpm/Directory.Build.props b/src/Installers/Rpm/Directory.Build.props
index 252ab60311c5..d74912838189 100644
--- a/src/Installers/Rpm/Directory.Build.props
+++ b/src/Installers/Rpm/Directory.Build.props
@@ -11,6 +11,7 @@
-cm.1
-cm.2
+ -newkey
true
diff --git a/src/Installers/Rpm/Directory.Build.targets b/src/Installers/Rpm/Directory.Build.targets
index 30d705abb1dc..e9800cf062eb 100644
--- a/src/Installers/Rpm/Directory.Build.targets
+++ b/src/Installers/Rpm/Directory.Build.targets
@@ -40,6 +40,7 @@
$(InstallersOutputPath)$(CblMarinerBaseName)$(CblMariner1VersionSuffix)$(CblMarinerExtension)
$(InstallersOutputPath)$(CblMarinerBaseName)$(CblMariner2VersionSuffix)$(CblMarinerExtension)
+ $(InstallersOutputPath)$(NewKeyBaseName)$(NewKeyVersionSuffix)$(NewKeyExtension)
@@ -103,5 +104,13 @@
UseHardlinksIfPossible="False" />
+
+
+
+
diff --git a/src/Installers/Rpm/Runtime/Rpm.Runtime.rpmproj b/src/Installers/Rpm/Runtime/Rpm.Runtime.rpmproj
index 5e0427aea7f8..26e74893aba8 100644
--- a/src/Installers/Rpm/Runtime/Rpm.Runtime.rpmproj
+++ b/src/Installers/Rpm/Runtime/Rpm.Runtime.rpmproj
@@ -16,5 +16,7 @@
$(InstallersOutputPath)$(TargetFileName)
$(RuntimeInstallerBaseName)-$(SharedFxVersion)
-$(RpmArch).rpm
+ $(RuntimeInstallerBaseName)-$(SharedFxVersion)
+ -$(RpmArch).rpm
diff --git a/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj b/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
index a29db936bd79..7098eaea452c 100644
--- a/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
+++ b/src/Installers/Rpm/TargetingPack/Rpm.TargetingPack.rpmproj
@@ -33,6 +33,8 @@
$(InstallersOutputPath)$(TargetFileName)
$(TargetingPackInstallerBaseName)-$(TargetingPackVersion)
-$(RpmArch).rpm
+ $(TargetingPackInstallerBaseName)-$(TargetingPackVersion)
+ -$(RpmArch).rpm
$(TargetingPackVersionPrefix)
diff --git a/src/Installers/Windows/WindowsHostingBundle/Product.targets b/src/Installers/Windows/WindowsHostingBundle/Product.targets
index 3b1cf82c1076..c1dc097445d4 100644
--- a/src/Installers/Windows/WindowsHostingBundle/Product.targets
+++ b/src/Installers/Windows/WindowsHostingBundle/Product.targets
@@ -83,9 +83,9 @@
-->
-
-
-
+
+
$(DotnetRuntimeSourceFeedKey)
diff --git a/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs b/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs
index 6b2a118cb132..72cae1507a0e 100644
--- a/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs
+++ b/src/Middleware/HttpOverrides/src/ForwardedHeadersMiddleware.cs
@@ -21,6 +21,7 @@ public class ForwardedHeadersMiddleware
private readonly ForwardedHeadersOptions _options;
private readonly RequestDelegate _next;
private readonly ILogger _logger;
+ private readonly bool _ignoreUnknownProxiesWithoutFor;
private bool _allowAllHosts;
private IList? _allowedHosts;
@@ -63,6 +64,18 @@ public ForwardedHeadersMiddleware(RequestDelegate next, ILoggerFactory loggerFac
_logger = loggerFactory.CreateLogger();
_next = next;
+ if (AppContext.TryGetSwitch("Microsoft.AspNetCore.HttpOverrides.IgnoreUnknownProxiesWithoutFor", out var enabled)
+ && enabled)
+ {
+ _ignoreUnknownProxiesWithoutFor = true;
+ }
+
+ if (Environment.GetEnvironmentVariable("MICROSOFT_ASPNETCORE_HTTPOVERRIDES_IGNORE_UNKNOWN_PROXIES_WITHOUT_FOR") is string env
+ && (env.Equals("true", StringComparison.OrdinalIgnoreCase) || env.Equals("1")))
+ {
+ _ignoreUnknownProxiesWithoutFor = true;
+ }
+
PreProcessHosts();
}
@@ -220,19 +233,24 @@ public void ApplyForwarders(HttpContext context)
for (; entriesConsumed < sets.Length; entriesConsumed++)
{
var set = sets[entriesConsumed];
- if (checkFor)
+ // Opt-out of breaking change behavior where we now always check KnownProxies and KnownNetworks
+ // It used to be guarded by the ForwardedHeaders.XForwardedFor flag, but now we always check it.
+ if (!_ignoreUnknownProxiesWithoutFor || checkFor)
{
// For the first instance, allow remoteIp to be null for servers that don't support it natively.
if (currentValues.RemoteIpAndPort != null && checkKnownIps && !CheckKnownAddress(currentValues.RemoteIpAndPort.Address))
{
// Stop at the first unknown remote IP, but still apply changes processed so far.
- if (_logger.IsEnabled(LogLevel.Debug))
+ if (_logger.IsEnabled(LogLevel.Warning))
{
- _logger.LogDebug(1, "Unknown proxy: {RemoteIpAndPort}", currentValues.RemoteIpAndPort);
+ _logger.LogWarning(1, "Unknown proxy: {RemoteIpAndPort}", currentValues.RemoteIpAndPort);
}
break;
}
+ }
+ if (checkFor)
+ {
if (IPEndPoint.TryParse(set.IpAndPortText, out var parsedEndPoint))
{
applyChanges = true;
diff --git a/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs b/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs
index aa33a191e7b7..627ad96a3cd6 100644
--- a/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs
+++ b/src/Middleware/HttpOverrides/test/ForwardedHeadersMiddlewareTest.cs
@@ -7,6 +7,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.TestHost;
+using Microsoft.DotNet.RemoteExecutor;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@@ -962,6 +963,201 @@ public async Task AllOptionsDisabledRequestDoesntChange()
Assert.Equal(PathString.Empty, context.Request.PathBase);
}
+ [Theory]
+ [InlineData(ForwardedHeaders.XForwardedFor, false)]
+ [InlineData(ForwardedHeaders.XForwardedFor, true)]
+ [InlineData(ForwardedHeaders.XForwardedHost, false)]
+ [InlineData(ForwardedHeaders.XForwardedHost, true)]
+ [InlineData(ForwardedHeaders.XForwardedProto, false)]
+ [InlineData(ForwardedHeaders.XForwardedProto, true)]
+ [InlineData(ForwardedHeaders.XForwardedPrefix, false)]
+ [InlineData(ForwardedHeaders.XForwardedPrefix, true)]
+ public async Task IgnoreXForwardedHeadersFromUnknownProxy(ForwardedHeaders forwardedHeaders, bool unknownProxy)
+ {
+ using var host = new HostBuilder()
+ .ConfigureWebHost(webHostBuilder =>
+ {
+ webHostBuilder
+ .UseTestServer()
+ .Configure(app =>
+ {
+ var options = new ForwardedHeadersOptions
+ {
+ ForwardedHeaders = forwardedHeaders
+ };
+ if (!unknownProxy)
+ {
+ var proxy = IPAddress.Parse("10.0.0.1");
+ options.KnownProxies.Add(proxy);
+ }
+ app.UseForwardedHeaders(options);
+ });
+ }).Build();
+
+ await host.StartAsync();
+
+ var server = host.GetTestServer();
+
+ var context = await server.SendAsync(c =>
+ {
+ c.Request.Headers["X-Forwarded-For"] = "11.111.111.11";
+ c.Request.Headers["X-Forwarded-Host"] = "testhost";
+ c.Request.Headers["X-Forwarded-Proto"] = "Protocol";
+ c.Request.Headers["X-Forwarded-Prefix"] = "/pathbase";
+ c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1");
+ c.Connection.RemotePort = 99;
+ });
+
+ if (unknownProxy)
+ {
+ Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString());
+ Assert.Equal("localhost", context.Request.Host.ToString());
+ Assert.Equal("http", context.Request.Scheme);
+ Assert.Equal(PathString.Empty, context.Request.PathBase);
+ }
+ else
+ {
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor))
+ {
+ Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString());
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost))
+ {
+ Assert.Equal("testhost", context.Request.Host.ToString());
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto))
+ {
+ Assert.Equal("Protocol", context.Request.Scheme);
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix))
+ {
+ Assert.Equal("/pathbase", context.Request.PathBase);
+ }
+ }
+ }
+
+ [Theory]
+ [InlineData(ForwardedHeaders.XForwardedFor)]
+ [InlineData(ForwardedHeaders.XForwardedHost)]
+ [InlineData(ForwardedHeaders.XForwardedProto)]
+ [InlineData(ForwardedHeaders.XForwardedPrefix)]
+ public void AppContextDoesNotValidateUnknownProxyWithoutForwardedFor(ForwardedHeaders forwardedHeaders)
+ {
+ RemoteExecutor.Invoke(static async (forwardedHeadersName) =>
+ {
+ Assert.True(Enum.TryParse(forwardedHeadersName, out var forwardedHeaders));
+ AppContext.SetSwitch("Microsoft.AspNetCore.HttpOverrides.IgnoreUnknownProxiesWithoutFor", true);
+ using var host = new HostBuilder()
+ .ConfigureWebHost(webHostBuilder =>
+ {
+ webHostBuilder
+ .UseTestServer()
+ .Configure(app =>
+ {
+ var options = new ForwardedHeadersOptions
+ {
+ ForwardedHeaders = forwardedHeaders
+ };
+ app.UseForwardedHeaders(options);
+ });
+ }).Build();
+
+ await host.StartAsync();
+
+ var server = host.GetTestServer();
+
+ var context = await server.SendAsync(c =>
+ {
+ c.Request.Headers["X-Forwarded-For"] = "11.111.111.11";
+ c.Request.Headers["X-Forwarded-Host"] = "testhost";
+ c.Request.Headers["X-Forwarded-Proto"] = "Protocol";
+ c.Request.Headers["X-Forwarded-Prefix"] = "/pathbase";
+ c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1");
+ c.Connection.RemotePort = 99;
+ });
+
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor))
+ {
+ // X-Forwarded-For ignored since 10.0.0.1 isn't in KnownProxies
+ Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString());
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost))
+ {
+ Assert.Equal("testhost", context.Request.Host.ToString());
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto))
+ {
+ Assert.Equal("Protocol", context.Request.Scheme);
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix))
+ {
+ Assert.Equal("/pathbase", context.Request.PathBase);
+ }
+ return RemoteExecutor.SuccessExitCode;
+ }, forwardedHeaders.ToString()).Dispose();
+ }
+
+ [Theory]
+ [InlineData(ForwardedHeaders.XForwardedFor)]
+ [InlineData(ForwardedHeaders.XForwardedHost)]
+ [InlineData(ForwardedHeaders.XForwardedProto)]
+ [InlineData(ForwardedHeaders.XForwardedPrefix)]
+ public void EnvVariableDoesNotValidateUnknownProxyWithoutForwardedFor(ForwardedHeaders forwardedHeaders)
+ {
+ RemoteExecutor.Invoke(static async (forwardedHeadersName) =>
+ {
+ Assert.True(Enum.TryParse(forwardedHeadersName, out var forwardedHeaders));
+ Environment.SetEnvironmentVariable("MICROSOFT_ASPNETCORE_HTTPOVERRIDES_IGNORE_UNKNOWN_PROXIES_WITHOUT_FOR", "true");
+ using var host = new HostBuilder()
+ .ConfigureWebHost(webHostBuilder =>
+ {
+ webHostBuilder
+ .UseTestServer()
+ .Configure(app =>
+ {
+ var options = new ForwardedHeadersOptions
+ {
+ ForwardedHeaders = forwardedHeaders
+ };
+ app.UseForwardedHeaders(options);
+ });
+ }).Build();
+
+ await host.StartAsync();
+
+ var server = host.GetTestServer();
+
+ var context = await server.SendAsync(c =>
+ {
+ c.Request.Headers["X-Forwarded-For"] = "11.111.111.11";
+ c.Request.Headers["X-Forwarded-Host"] = "testhost";
+ c.Request.Headers["X-Forwarded-Proto"] = "Protocol";
+ c.Request.Headers["X-Forwarded-Prefix"] = "/pathbase";
+ c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1");
+ c.Connection.RemotePort = 99;
+ });
+
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor))
+ {
+ // X-Forwarded-For ignored since 10.0.0.1 isn't in KnownProxies
+ Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString());
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost))
+ {
+ Assert.Equal("testhost", context.Request.Host.ToString());
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto))
+ {
+ Assert.Equal("Protocol", context.Request.Scheme);
+ }
+ if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix))
+ {
+ Assert.Equal("/pathbase", context.Request.PathBase);
+ }
+ return RemoteExecutor.SuccessExitCode;
+ }, forwardedHeaders.ToString()).Dispose();
+ }
+
[Fact]
public async Task PartiallyEnabledForwardsPartiallyChangesRequest()
{
diff --git a/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs b/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
index a75546b6793f..38a38069b32c 100644
--- a/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
+++ b/src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
+using System.Linq;
using Microsoft.Extensions.Caching.Memory;
namespace Microsoft.AspNetCore.OutputCaching.Memory;
@@ -9,7 +10,7 @@ namespace Microsoft.AspNetCore.OutputCaching.Memory;
internal sealed class MemoryOutputCacheStore : IOutputCacheStore
{
private readonly MemoryCache _cache;
- private readonly Dictionary> _taggedEntries = new();
+ private readonly Dictionary> _taggedEntries = [];
private readonly object _tagsLock = new();
internal MemoryOutputCacheStore(MemoryCache cache)
@@ -20,7 +21,7 @@ internal MemoryOutputCacheStore(MemoryCache cache)
}
// For testing
- internal Dictionary> TaggedEntries => _taggedEntries;
+ internal Dictionary> TaggedEntries => _taggedEntries.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(t => t.Key).ToHashSet());
public ValueTask EvictByTagAsync(string tag, CancellationToken cancellationToken)
{
@@ -30,7 +31,7 @@ public ValueTask EvictByTagAsync(string tag, CancellationToken cancellationToken
{
if (_taggedEntries.TryGetValue(tag, out var keys))
{
- if (keys != null && keys.Count > 0)
+ if (keys is { Count: > 0 })
{
// If MemoryCache changed to run eviction callbacks inline in Remove, iterating over keys could throw
// To prevent allocating a copy of the keys we check if the eviction callback ran,
@@ -40,7 +41,7 @@ public ValueTask EvictByTagAsync(string tag, CancellationToken cancellationToken
while (i > 0)
{
var oldCount = keys.Count;
- foreach (var key in keys)
+ foreach (var (key, _) in keys)
{
_cache.Remove(key);
i--;
@@ -74,6 +75,8 @@ public ValueTask SetAsync(string key, byte[] value, string[]? tags, TimeSpan val
ArgumentNullException.ThrowIfNull(key);
ArgumentNullException.ThrowIfNull(value);
+ var entryId = Guid.NewGuid();
+
if (tags != null)
{
// Lock with SetEntry() to prevent EvictByTagAsync() from trying to remove a tag whose entry hasn't been added yet.
@@ -90,27 +93,27 @@ public ValueTask SetAsync(string key, byte[] value, string[]? tags, TimeSpan val
if (!_taggedEntries.TryGetValue(tag, out var keys))
{
- keys = new HashSet();
+ keys = new HashSet();
_taggedEntries[tag] = keys;
}
Debug.Assert(keys != null);
- keys.Add(key);
+ keys.Add(new TaggedEntry(key, entryId));
}
- SetEntry(key, value, tags, validFor);
+ SetEntry(key, value, tags, validFor, entryId);
}
}
else
{
- SetEntry(key, value, tags, validFor);
+ SetEntry(key, value, tags, validFor, entryId);
}
return ValueTask.CompletedTask;
}
- void SetEntry(string key, byte[] value, string[]? tags, TimeSpan validFor)
+ private void SetEntry(string key, byte[] value, string[]? tags, TimeSpan validFor, Guid entryId)
{
Debug.Assert(key != null);
@@ -120,22 +123,25 @@ void SetEntry(string key, byte[] value, string[]? tags, TimeSpan validFor)
Size = value.Length
};
- if (tags != null && tags.Length > 0)
+ if (tags is { Length: > 0 })
{
// Remove cache keys from tag lists when the entry is evicted
- options.RegisterPostEvictionCallback(RemoveFromTags, tags);
+ options.RegisterPostEvictionCallback(RemoveFromTags, (tags, entryId));
}
_cache.Set(key, value, options);
}
- void RemoveFromTags(object key, object? value, EvictionReason reason, object? state)
+ private void RemoveFromTags(object key, object? value, EvictionReason reason, object? state)
{
- var tags = state as string[];
+ Debug.Assert(state != null);
+
+ var (tags, entryId) = ((string[] Tags, Guid EntryId))state;
Debug.Assert(tags != null);
Debug.Assert(tags.Length > 0);
Debug.Assert(key is string);
+ Debug.Assert(entryId != Guid.Empty);
lock (_tagsLock)
{
@@ -143,7 +149,7 @@ void RemoveFromTags(object key, object? value, EvictionReason reason, object? st
{
if (_taggedEntries.TryGetValue(tag, out var tagged))
{
- tagged.Remove((string)key);
+ tagged.Remove(new TaggedEntry((string)key, entryId));
// Remove the collection if there is no more keys in it
if (tagged.Count == 0)
@@ -154,4 +160,6 @@ void RemoveFromTags(object key, object? value, EvictionReason reason, object? st
}
}
}
+
+ private record TaggedEntry(string Key, Guid EntryId);
}
diff --git a/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs b/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs
index e8c809911add..c1ad1d708f4b 100644
--- a/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs
+++ b/src/Middleware/OutputCaching/test/MemoryOutputCacheStoreTests.cs
@@ -197,6 +197,43 @@ public async Task ExpiredEntries_AreRemovedFromTags()
Assert.Single(tag2s);
}
+ [Fact]
+ public async Task ReplacedEntries_AreNotRemovedFromTags()
+ {
+ var testClock = new TestMemoryOptionsClock { UtcNow = DateTimeOffset.UtcNow };
+ var cache = new MemoryCache(new MemoryCacheOptions { SizeLimit = 1000, Clock = testClock, ExpirationScanFrequency = TimeSpan.FromMilliseconds(1) });
+ var store = new MemoryOutputCacheStore(cache);
+ var value = "abc"u8.ToArray();
+
+ await store.SetAsync("a", value, new[] { "tag1", "tag2" }, TimeSpan.FromMilliseconds(5), default);
+ await store.SetAsync("a", value, new[] { "tag1" }, TimeSpan.FromMilliseconds(20), default);
+
+ testClock.Advance(TimeSpan.FromMilliseconds(10));
+
+ // Trigger background expiration by accessing the cache.
+ _ = cache.Get("a");
+
+ var resulta = await store.GetAsync("a", default);
+
+ Assert.NotNull(resulta);
+
+ HashSet tag1s, tag2s;
+
+ // Wait for the tag2 HashSet to be removed by the background expiration thread.
+
+ using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
+
+ while (store.TaggedEntries.TryGetValue("tag2", out tag2s) && !cts.IsCancellationRequested)
+ {
+ await Task.Yield();
+ }
+
+ store.TaggedEntries.TryGetValue("tag1", out tag1s);
+
+ Assert.Null(tag2s);
+ Assert.Single(tag1s);
+ }
+
[Theory]
[InlineData(null)]
public async Task Store_Throws_OnInvalidTag(string tag)
diff --git a/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs b/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs
index c1ac26b46742..f04f8895bd9a 100644
--- a/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs
+++ b/src/Mvc/Mvc.ViewFeatures/src/HtmlAttributePropertyHelper.cs
@@ -25,8 +25,7 @@ public HtmlAttributePropertyHelper(PropertyHelper propertyHelper)
///
/// Part of contract.
///
- ///
- public static void UpdateCache(Type _)
+ public static void ClearCache(Type[] _)
{
ReflectionCache.Clear();
}
diff --git a/src/OpenApi/sample/Controllers/TestController.cs b/src/OpenApi/sample/Controllers/TestController.cs
index cf1fed79abb2..26c47ba191d0 100644
--- a/src/OpenApi/sample/Controllers/TestController.cs
+++ b/src/OpenApi/sample/Controllers/TestController.cs
@@ -24,6 +24,15 @@ public IActionResult PostForm([FromForm] MvcTodo todo)
return Ok(todo);
}
+ [HttpGet]
+ [Produces("application/json")]
+ [ProducesResponseType(typeof(CurrentWeather), 200)]
+ [Route("/getcultureinvariant")]
+ public IActionResult GetCurrentWeather()
+ {
+ return Ok(new CurrentWeather(1.0f));
+ }
+
public class RouteParamsContainer
{
[FromRoute]
@@ -36,4 +45,6 @@ public class RouteParamsContainer
}
public record MvcTodo(string Title, string Description, bool IsCompleted);
+
+ public record CurrentWeather([Range(-100.5f, 100.5f)] float Temperature = 0.1f);
}
diff --git a/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs b/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs
index fd196d7fc101..acf7ae1bd41d 100644
--- a/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs
+++ b/src/OpenApi/sample/EndpointRouteBuilderExtensions.cs
@@ -43,4 +43,92 @@ public static IEndpointConventionBuilder MapSwaggerUi(this IEndpointRouteBuilder