From 99e5c9631aa90fb94bee8db61c3f472327383601 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 2 Nov 2022 06:26:12 +0000 Subject: [PATCH 01/35] [internal/release/7.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 8 ++++++-- eng/Version.Details.xml | 32 ++++++++++++++++---------------- eng/Versions.props | 16 ++++++++-------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/NuGet.config b/NuGet.config index 4febaf49618f..7aac84a4a686 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,12 @@ - + + + @@ -29,9 +31,11 @@ - + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ae7bf522c30d..5526d4a7ec1f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 865c6a897058a6ee4c7e014c0cefdcb04dc5e292 + 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime diff --git a/eng/Versions.props b/eng/Versions.props index c8f8f7021569..93d8d60ad883 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -125,14 +125,14 @@ 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 7.0.0-beta.22513.4 7.0.0-beta.22513.4 From bad79e60762bfa064098f0cb94cb78eae080d608 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Wed, 2 Nov 2022 15:51:08 +0000 Subject: [PATCH 02/35] [internal/release/7.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index 7aac84a4a686..ef1f8581edd2 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -31,7 +31,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5526d4a7ec1f..fa2cd98eb44f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - 47ac39d5457f88f61cc5e9904f7909c4b1ea10fd + baac22d83d49e7f9f36bedc2df8404776c0a3aff https://dev.azure.com/dnceng/internal/_git/dotnet-runtime From 01b8d251bd656555ceb7cf22f984ec8803258e1f Mon Sep 17 00:00:00 2001 From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com> Date: Thu, 3 Nov 2022 20:06:25 -0700 Subject: [PATCH 03/35] Update branding to 7.0.1 (#44768) - Update branding to 7.0.1 - Complete 7.0.1 branding - change label to "servicing" - check in 7.0.0 PackageOverrides.txt and PlatformManifest.txt files - Special case current .NET SDK version - use incoming runtime even though this is a servicing build Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com> --- eng/PackageOverrides.txt | 262 ++++++++--------- eng/PlatformManifest.txt | 268 +++++++++--------- eng/Versions.props | 8 +- .../GenerateFiles/Directory.Build.targets.in | 2 +- 4 files changed, 274 insertions(+), 266 deletions(-) diff --git a/eng/PackageOverrides.txt b/eng/PackageOverrides.txt index ba206da38fc2..73fcb5d8f8e2 100644 --- a/eng/PackageOverrides.txt +++ b/eng/PackageOverrides.txt @@ -1,129 +1,133 @@ -Microsoft.Extensions.Caching.Abstractions|6.0.0 -Microsoft.Extensions.Caching.Memory|6.0.0 -Microsoft.Extensions.Configuration.Abstractions|6.0.0 -Microsoft.Extensions.Configuration.Binder|6.0.0 -Microsoft.Extensions.Configuration.CommandLine|6.0.0 -Microsoft.Extensions.Configuration|6.0.0 -Microsoft.Extensions.Configuration.EnvironmentVariables|6.0.0 -Microsoft.Extensions.Configuration.FileExtensions|6.0.0 -Microsoft.Extensions.Configuration.Ini|6.0.0 -Microsoft.Extensions.Configuration.Json|6.0.0 -Microsoft.Extensions.Configuration.UserSecrets|6.0.0 -Microsoft.Extensions.Configuration.Xml|6.0.0 -Microsoft.Extensions.DependencyInjection.Abstractions|6.0.0 -Microsoft.Extensions.DependencyInjection|6.0.0 -Microsoft.Extensions.FileProviders.Abstractions|6.0.0 -Microsoft.Extensions.FileProviders.Composite|6.0.0 -Microsoft.Extensions.FileProviders.Physical|6.0.0 -Microsoft.Extensions.FileSystemGlobbing|6.0.0 -Microsoft.Extensions.Hosting.Abstractions|6.0.0 -Microsoft.Extensions.Hosting|6.0.0 -Microsoft.Extensions.Http|6.0.0 -Microsoft.Extensions.Logging.Abstractions|6.0.0 -Microsoft.Extensions.Logging.Configuration|6.0.0 -Microsoft.Extensions.Logging.Console|6.0.0 -Microsoft.Extensions.Logging.Debug|6.0.0 -Microsoft.Extensions.Logging|6.0.0 -Microsoft.Extensions.Logging.EventLog|6.0.0 -Microsoft.Extensions.Logging.EventSource|6.0.0 -Microsoft.Extensions.Logging.TraceSource|6.0.0 -Microsoft.Extensions.Options.ConfigurationExtensions|6.0.0 -Microsoft.Extensions.Options.DataAnnotations|6.0.0 -Microsoft.Extensions.Options|6.0.0 -Microsoft.Extensions.Primitives|6.0.0 -System.Diagnostics.EventLog|6.0.0 -System.IO.Pipelines|6.0.0 -System.Security.Cryptography.Xml|6.0.0 -Microsoft.AspNetCore.Antiforgery|6.0.0 -Microsoft.AspNetCore.Authentication.Abstractions|6.0.0 -Microsoft.AspNetCore.Authentication.Cookies|6.0.0 -Microsoft.AspNetCore.Authentication.Core|6.0.0 -Microsoft.AspNetCore.Authentication|6.0.0 -Microsoft.AspNetCore.Authentication.OAuth|6.0.0 -Microsoft.AspNetCore.Authorization|6.0.0 -Microsoft.AspNetCore.Authorization.Policy|6.0.0 -Microsoft.AspNetCore.Components.Authorization|6.0.0 -Microsoft.AspNetCore.Components|6.0.0 -Microsoft.AspNetCore.Components.Forms|6.0.0 -Microsoft.AspNetCore.Components.Server|6.0.0 -Microsoft.AspNetCore.Components.Web|6.0.0 -Microsoft.AspNetCore.Connections.Abstractions|6.0.0 -Microsoft.AspNetCore.CookiePolicy|6.0.0 -Microsoft.AspNetCore.Cors|6.0.0 -Microsoft.AspNetCore.Cryptography.Internal|6.0.0 -Microsoft.AspNetCore.Cryptography.KeyDerivation|6.0.0 -Microsoft.AspNetCore.DataProtection.Abstractions|6.0.0 -Microsoft.AspNetCore.DataProtection|6.0.0 -Microsoft.AspNetCore.DataProtection.Extensions|6.0.0 -Microsoft.AspNetCore.Diagnostics.Abstractions|6.0.0 -Microsoft.AspNetCore.Diagnostics|6.0.0 -Microsoft.AspNetCore.Diagnostics.HealthChecks|6.0.0 -Microsoft.AspNetCore|6.0.0 -Microsoft.AspNetCore.HostFiltering|6.0.0 -Microsoft.AspNetCore.Hosting.Abstractions|6.0.0 -Microsoft.AspNetCore.Hosting|6.0.0 -Microsoft.AspNetCore.Hosting.Server.Abstractions|6.0.0 -Microsoft.AspNetCore.Html.Abstractions|6.0.0 -Microsoft.AspNetCore.Http.Abstractions|6.0.0 -Microsoft.AspNetCore.Http.Connections.Common|6.0.0 -Microsoft.AspNetCore.Http.Connections|6.0.0 -Microsoft.AspNetCore.Http|6.0.0 -Microsoft.AspNetCore.Http.Extensions|6.0.0 -Microsoft.AspNetCore.Http.Features|6.0.0 -Microsoft.AspNetCore.Http.Results|6.0.0 -Microsoft.AspNetCore.HttpLogging|6.0.0 -Microsoft.AspNetCore.HttpOverrides|6.0.0 -Microsoft.AspNetCore.HttpsPolicy|6.0.0 -Microsoft.AspNetCore.Identity|6.0.0 -Microsoft.AspNetCore.Localization|6.0.0 -Microsoft.AspNetCore.Localization.Routing|6.0.0 -Microsoft.AspNetCore.Metadata|6.0.0 -Microsoft.AspNetCore.Mvc.Abstractions|6.0.0 -Microsoft.AspNetCore.Mvc.ApiExplorer|6.0.0 -Microsoft.AspNetCore.Mvc.Core|6.0.0 -Microsoft.AspNetCore.Mvc.Cors|6.0.0 -Microsoft.AspNetCore.Mvc.DataAnnotations|6.0.0 -Microsoft.AspNetCore.Mvc|6.0.0 -Microsoft.AspNetCore.Mvc.Formatters.Json|6.0.0 -Microsoft.AspNetCore.Mvc.Formatters.Xml|6.0.0 -Microsoft.AspNetCore.Mvc.Localization|6.0.0 -Microsoft.AspNetCore.Mvc.Razor|6.0.0 -Microsoft.AspNetCore.Mvc.RazorPages|6.0.0 -Microsoft.AspNetCore.Mvc.TagHelpers|6.0.0 -Microsoft.AspNetCore.Mvc.ViewFeatures|6.0.0 -Microsoft.AspNetCore.Razor|6.0.0 -Microsoft.AspNetCore.Razor.Runtime|6.0.0 -Microsoft.AspNetCore.ResponseCaching.Abstractions|6.0.0 -Microsoft.AspNetCore.ResponseCaching|6.0.0 -Microsoft.AspNetCore.ResponseCompression|6.0.0 -Microsoft.AspNetCore.Rewrite|6.0.0 -Microsoft.AspNetCore.Routing.Abstractions|6.0.0 -Microsoft.AspNetCore.Routing|6.0.0 -Microsoft.AspNetCore.Server.HttpSys|6.0.0 -Microsoft.AspNetCore.Server.IIS|6.0.0 -Microsoft.AspNetCore.Server.IISIntegration|6.0.0 -Microsoft.AspNetCore.Server.Kestrel.Core|6.0.0 -Microsoft.AspNetCore.Server.Kestrel|6.0.0 -Microsoft.AspNetCore.Server.Kestrel.Transport.Quic|6.0.0 -Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|6.0.0 -Microsoft.AspNetCore.Session|6.0.0 -Microsoft.AspNetCore.SignalR.Common|6.0.0 -Microsoft.AspNetCore.SignalR.Core|6.0.0 -Microsoft.AspNetCore.SignalR|6.0.0 -Microsoft.AspNetCore.SignalR.Protocols.Json|6.0.0 -Microsoft.AspNetCore.StaticFiles|6.0.0 -Microsoft.AspNetCore.WebSockets|6.0.0 -Microsoft.AspNetCore.WebUtilities|6.0.0 -Microsoft.Extensions.Configuration.KeyPerFile|6.0.0 -Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions|6.0.0 -Microsoft.Extensions.Diagnostics.HealthChecks|6.0.0 -Microsoft.Extensions.Features|6.0.0 -Microsoft.Extensions.FileProviders.Embedded|6.0.0 -Microsoft.Extensions.Identity.Core|6.0.0 -Microsoft.Extensions.Identity.Stores|6.0.0 -Microsoft.Extensions.Localization.Abstractions|6.0.0 -Microsoft.Extensions.Localization|6.0.0 -Microsoft.Extensions.ObjectPool|6.0.0 -Microsoft.Extensions.WebEncoders|6.0.0 -Microsoft.JSInterop|6.0.0 -Microsoft.Net.Http.Headers|6.0.0 +Microsoft.Extensions.Caching.Abstractions|7.0.0 +Microsoft.Extensions.Caching.Memory|7.0.0 +Microsoft.Extensions.Configuration.Abstractions|7.0.0 +Microsoft.Extensions.Configuration.Binder|7.0.0 +Microsoft.Extensions.Configuration.CommandLine|7.0.0 +Microsoft.Extensions.Configuration|7.0.0 +Microsoft.Extensions.Configuration.EnvironmentVariables|7.0.0 +Microsoft.Extensions.Configuration.FileExtensions|7.0.0 +Microsoft.Extensions.Configuration.Ini|7.0.0 +Microsoft.Extensions.Configuration.Json|7.0.0 +Microsoft.Extensions.Configuration.UserSecrets|7.0.0 +Microsoft.Extensions.Configuration.Xml|7.0.0 +Microsoft.Extensions.DependencyInjection.Abstractions|7.0.0 +Microsoft.Extensions.DependencyInjection|7.0.0 +Microsoft.Extensions.FileProviders.Abstractions|7.0.0 +Microsoft.Extensions.FileProviders.Composite|7.0.0 +Microsoft.Extensions.FileProviders.Physical|7.0.0 +Microsoft.Extensions.FileSystemGlobbing|7.0.0 +Microsoft.Extensions.Hosting.Abstractions|7.0.0 +Microsoft.Extensions.Hosting|7.0.0 +Microsoft.Extensions.Http|7.0.0 +Microsoft.Extensions.Logging.Abstractions|7.0.0 +Microsoft.Extensions.Logging.Configuration|7.0.0 +Microsoft.Extensions.Logging.Console|7.0.0 +Microsoft.Extensions.Logging.Debug|7.0.0 +Microsoft.Extensions.Logging|7.0.0 +Microsoft.Extensions.Logging.EventLog|7.0.0 +Microsoft.Extensions.Logging.EventSource|7.0.0 +Microsoft.Extensions.Logging.TraceSource|7.0.0 +Microsoft.Extensions.Options.ConfigurationExtensions|7.0.0 +Microsoft.Extensions.Options.DataAnnotations|7.0.0 +Microsoft.Extensions.Options|7.0.0 +Microsoft.Extensions.Primitives|7.0.0 +System.Diagnostics.EventLog|7.0.0 +System.IO.Pipelines|7.0.0 +System.Security.Cryptography.Xml|7.0.0 +System.Threading.RateLimiting|7.0.0 +Microsoft.AspNetCore.Antiforgery|7.0.0 +Microsoft.AspNetCore.Authentication.Abstractions|7.0.0 +Microsoft.AspNetCore.Authentication.Cookies|7.0.0 +Microsoft.AspNetCore.Authentication.Core|7.0.0 +Microsoft.AspNetCore.Authentication|7.0.0 +Microsoft.AspNetCore.Authentication.OAuth|7.0.0 +Microsoft.AspNetCore.Authorization|7.0.0 +Microsoft.AspNetCore.Authorization.Policy|7.0.0 +Microsoft.AspNetCore.Components.Authorization|7.0.0 +Microsoft.AspNetCore.Components|7.0.0 +Microsoft.AspNetCore.Components.Forms|7.0.0 +Microsoft.AspNetCore.Components.Server|7.0.0 +Microsoft.AspNetCore.Components.Web|7.0.0 +Microsoft.AspNetCore.Connections.Abstractions|7.0.0 +Microsoft.AspNetCore.CookiePolicy|7.0.0 +Microsoft.AspNetCore.Cors|7.0.0 +Microsoft.AspNetCore.Cryptography.Internal|7.0.0 +Microsoft.AspNetCore.Cryptography.KeyDerivation|7.0.0 +Microsoft.AspNetCore.DataProtection.Abstractions|7.0.0 +Microsoft.AspNetCore.DataProtection|7.0.0 +Microsoft.AspNetCore.DataProtection.Extensions|7.0.0 +Microsoft.AspNetCore.Diagnostics.Abstractions|7.0.0 +Microsoft.AspNetCore.Diagnostics|7.0.0 +Microsoft.AspNetCore.Diagnostics.HealthChecks|7.0.0 +Microsoft.AspNetCore|7.0.0 +Microsoft.AspNetCore.HostFiltering|7.0.0 +Microsoft.AspNetCore.Hosting.Abstractions|7.0.0 +Microsoft.AspNetCore.Hosting|7.0.0 +Microsoft.AspNetCore.Hosting.Server.Abstractions|7.0.0 +Microsoft.AspNetCore.Html.Abstractions|7.0.0 +Microsoft.AspNetCore.Http.Abstractions|7.0.0 +Microsoft.AspNetCore.Http.Connections.Common|7.0.0 +Microsoft.AspNetCore.Http.Connections|7.0.0 +Microsoft.AspNetCore.Http|7.0.0 +Microsoft.AspNetCore.Http.Extensions|7.0.0 +Microsoft.AspNetCore.Http.Features|7.0.0 +Microsoft.AspNetCore.Http.Results|7.0.0 +Microsoft.AspNetCore.HttpLogging|7.0.0 +Microsoft.AspNetCore.HttpOverrides|7.0.0 +Microsoft.AspNetCore.HttpsPolicy|7.0.0 +Microsoft.AspNetCore.Identity|7.0.0 +Microsoft.AspNetCore.Localization|7.0.0 +Microsoft.AspNetCore.Localization.Routing|7.0.0 +Microsoft.AspNetCore.Metadata|7.0.0 +Microsoft.AspNetCore.Mvc.Abstractions|7.0.0 +Microsoft.AspNetCore.Mvc.ApiExplorer|7.0.0 +Microsoft.AspNetCore.Mvc.Core|7.0.0 +Microsoft.AspNetCore.Mvc.Cors|7.0.0 +Microsoft.AspNetCore.Mvc.DataAnnotations|7.0.0 +Microsoft.AspNetCore.Mvc|7.0.0 +Microsoft.AspNetCore.Mvc.Formatters.Json|7.0.0 +Microsoft.AspNetCore.Mvc.Formatters.Xml|7.0.0 +Microsoft.AspNetCore.Mvc.Localization|7.0.0 +Microsoft.AspNetCore.Mvc.Razor|7.0.0 +Microsoft.AspNetCore.Mvc.RazorPages|7.0.0 +Microsoft.AspNetCore.Mvc.TagHelpers|7.0.0 +Microsoft.AspNetCore.Mvc.ViewFeatures|7.0.0 +Microsoft.AspNetCore.OutputCaching|7.0.0 +Microsoft.AspNetCore.RateLimiting|7.0.0 +Microsoft.AspNetCore.Razor|7.0.0 +Microsoft.AspNetCore.Razor.Runtime|7.0.0 +Microsoft.AspNetCore.RequestDecompression|7.0.0 +Microsoft.AspNetCore.ResponseCaching.Abstractions|7.0.0 +Microsoft.AspNetCore.ResponseCaching|7.0.0 +Microsoft.AspNetCore.ResponseCompression|7.0.0 +Microsoft.AspNetCore.Rewrite|7.0.0 +Microsoft.AspNetCore.Routing.Abstractions|7.0.0 +Microsoft.AspNetCore.Routing|7.0.0 +Microsoft.AspNetCore.Server.HttpSys|7.0.0 +Microsoft.AspNetCore.Server.IIS|7.0.0 +Microsoft.AspNetCore.Server.IISIntegration|7.0.0 +Microsoft.AspNetCore.Server.Kestrel.Core|7.0.0 +Microsoft.AspNetCore.Server.Kestrel|7.0.0 +Microsoft.AspNetCore.Server.Kestrel.Transport.Quic|7.0.0 +Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets|7.0.0 +Microsoft.AspNetCore.Session|7.0.0 +Microsoft.AspNetCore.SignalR.Common|7.0.0 +Microsoft.AspNetCore.SignalR.Core|7.0.0 +Microsoft.AspNetCore.SignalR|7.0.0 +Microsoft.AspNetCore.SignalR.Protocols.Json|7.0.0 +Microsoft.AspNetCore.StaticFiles|7.0.0 +Microsoft.AspNetCore.WebSockets|7.0.0 +Microsoft.AspNetCore.WebUtilities|7.0.0 +Microsoft.Extensions.Configuration.KeyPerFile|7.0.0 +Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions|7.0.0 +Microsoft.Extensions.Diagnostics.HealthChecks|7.0.0 +Microsoft.Extensions.Features|7.0.0 +Microsoft.Extensions.FileProviders.Embedded|7.0.0 +Microsoft.Extensions.Identity.Core|7.0.0 +Microsoft.Extensions.Identity.Stores|7.0.0 +Microsoft.Extensions.Localization.Abstractions|7.0.0 +Microsoft.Extensions.Localization|7.0.0 +Microsoft.Extensions.ObjectPool|7.0.0 +Microsoft.Extensions.WebEncoders|7.0.0 +Microsoft.JSInterop|7.0.0 +Microsoft.Net.Http.Headers|7.0.0 diff --git a/eng/PlatformManifest.txt b/eng/PlatformManifest.txt index 19a461f79e33..a527f554d3e2 100644 --- a/eng/PlatformManifest.txt +++ b/eng/PlatformManifest.txt @@ -1,132 +1,136 @@ -aspnetcorev2_inprocess.dll|Microsoft.AspNetCore.App.Ref||16.0.21299.0 -Microsoft.AspNetCore.Antiforgery.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authentication.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authentication.Cookies.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authentication.Core.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authentication.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authentication.OAuth.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authorization.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Authorization.Policy.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Components.Authorization.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Components.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Components.Forms.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Components.Server.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Components.Web.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Connections.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.CookiePolicy.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Cors.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Cryptography.Internal.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Cryptography.KeyDerivation.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.DataProtection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.DataProtection.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.DataProtection.Extensions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Diagnostics.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Diagnostics.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.HostFiltering.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Hosting.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Hosting.Server.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Html.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.Connections.Common.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.Connections.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.Extensions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.Features.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Http.Results.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.HttpLogging.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.HttpOverrides.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.HttpsPolicy.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Identity.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Localization.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Localization.Routing.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Metadata.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.ApiExplorer.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Core.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Cors.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Formatters.Json.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Formatters.Xml.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Localization.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.Razor.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.RazorPages.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.TagHelpers.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Mvc.ViewFeatures.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Razor.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Razor.Runtime.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.ResponseCaching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.ResponseCaching.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.ResponseCompression.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Rewrite.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Routing.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Routing.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.HttpSys.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.IIS.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.IISIntegration.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.Kestrel.Core.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.Kestrel.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.Session.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.SignalR.Common.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.SignalR.Core.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.SignalR.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.SignalR.Protocols.Json.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.StaticFiles.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.WebSockets.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.AspNetCore.WebUtilities.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Caching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Caching.Memory.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.Binder.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.CommandLine.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.EnvironmentVariables.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.FileExtensions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.Ini.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.Json.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.KeyPerFile.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Configuration.UserSecrets.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Configuration.Xml.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.DependencyInjection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.DependencyInjection.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Features.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.FileProviders.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.FileProviders.Composite.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.FileProviders.Embedded.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.FileProviders.Physical.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.FileSystemGlobbing.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Hosting.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Http.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Identity.Core.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Identity.Stores.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Localization.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Localization.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Logging.Abstractions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.Configuration.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.Console.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.Debug.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.EventLog.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.EventSource.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Logging.TraceSource.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.ObjectPool.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Extensions.Options.ConfigurationExtensions.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Options.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Options.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.Primitives.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -Microsoft.Extensions.WebEncoders.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.JSInterop.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -Microsoft.Net.Http.Headers.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52608 -System.Diagnostics.EventLog.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -System.Diagnostics.EventLog.Messages.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|0.0.0.0 -System.IO.Pipelines.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -System.Security.Cryptography.Pkcs.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 -System.Security.Cryptography.Xml.dll|Microsoft.AspNetCore.App.Ref|6.0.0.0|6.0.21.52210 \ No newline at end of file +aspnetcorev2_inprocess.dll|Microsoft.AspNetCore.App.Ref||17.0.22292.0 +Microsoft.AspNetCore.Antiforgery.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authentication.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authentication.Cookies.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authentication.Core.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authentication.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authentication.OAuth.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authorization.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Authorization.Policy.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Components.Authorization.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Components.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Components.Forms.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Components.Server.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Components.Web.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Connections.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.CookiePolicy.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Cors.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Cryptography.Internal.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Cryptography.KeyDerivation.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.DataProtection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.DataProtection.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.DataProtection.Extensions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Diagnostics.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Diagnostics.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.HostFiltering.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Hosting.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Hosting.Server.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Html.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.Connections.Common.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.Connections.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.Extensions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.Features.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Http.Results.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.HttpLogging.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.HttpOverrides.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.HttpsPolicy.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Identity.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Localization.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Localization.Routing.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Metadata.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.ApiExplorer.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Core.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Cors.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Formatters.Json.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Formatters.Xml.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Localization.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.Razor.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.RazorPages.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.TagHelpers.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Mvc.ViewFeatures.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.OutputCaching.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.RateLimiting.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Razor.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Razor.Runtime.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.RequestDecompression.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.ResponseCaching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.ResponseCaching.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.ResponseCompression.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Rewrite.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Routing.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Routing.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.HttpSys.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.IIS.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.IISIntegration.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.Kestrel.Core.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.Kestrel.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.Session.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.SignalR.Common.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.SignalR.Core.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.SignalR.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.SignalR.Protocols.Json.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.StaticFiles.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.WebSockets.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.AspNetCore.WebUtilities.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Caching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Caching.Memory.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.Binder.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.CommandLine.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.EnvironmentVariables.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.FileExtensions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.Ini.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.Json.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.KeyPerFile.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Configuration.UserSecrets.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Configuration.Xml.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.DependencyInjection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.DependencyInjection.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Features.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.FileProviders.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.FileProviders.Composite.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.FileProviders.Embedded.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.FileProviders.Physical.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.FileSystemGlobbing.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Hosting.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Http.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Identity.Core.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Identity.Stores.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Localization.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Localization.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Logging.Abstractions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.Configuration.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.Console.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.Debug.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.EventLog.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.EventSource.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Logging.TraceSource.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.ObjectPool.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Extensions.Options.ConfigurationExtensions.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Options.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Options.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.Primitives.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +Microsoft.Extensions.WebEncoders.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.JSInterop.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +Microsoft.Net.Http.Headers.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51819 +System.Diagnostics.EventLog.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +System.Diagnostics.EventLog.Messages.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|0.0.0.0 +System.IO.Pipelines.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +System.Security.Cryptography.Pkcs.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +System.Security.Cryptography.Xml.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 +System.Threading.RateLimiting.dll|Microsoft.AspNetCore.App.Ref|7.0.0.0|7.0.22.51805 \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 2a71bdcb1f5e..a9f6b4797ecd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -8,15 +8,15 @@ 7 0 - 0 - true + 1 + false true release - rtm - RTM + servicing + Servicing true false $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index 1af2667cb4b4..3da7ea2b44d3 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -53,7 +53,7 @@ e.g. tool projects (again, property not set) use latest. On the other hand, $(TargetLatestDotNetRuntime) is specific to this repo and controls only the update below. --> - ${MicrosoftNETCoreAppRuntimeVersion} From 0bf66dc79855e2eb27874205d58b06c811d13bf6 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Thu, 3 Nov 2022 20:07:41 -0700 Subject: [PATCH 04/35] [release/7.0] Add CodeQL3000 run to aspnetcore-ci-official (#44717) - backport of #44688 - add new schedule for a weekly run - add top-level parameter enabling CodeQL3000 in manual builds - add `enableSBOM` and `variables` parameters in default-build.yml - add a separate job w/ CodeQL3000 tasks included in build steps; run this job alone - use the new default-build.yml parameters - set `$(UseSharedCompilation)` to `false` to ease analysis - add tag indicating CodeQL3000 tasks did useful work - ignore no-op task executions - add a tsaoptions.json file - cribbed values from our eng/sdl-tsa-vars.config file nit: Unconditionally disable the auto-injected component governance build step - job.yml inserts the task where we need (unless overridden) --- .azure/pipelines/ci.yml | 1314 ++++++++++++----------- .azure/pipelines/jobs/default-build.yml | 38 +- .config/tsaoptions.json | 12 + 3 files changed, 734 insertions(+), 630 deletions(-) create mode 100644 .config/tsaoptions.json diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 3ac92b9a12b1..4db1d90864a9 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -18,18 +18,38 @@ pr: include: - '*' +schedules: +- cron: 0 9 * * 1 + displayName: "Run CodeQL3000 weekly, Monday at 2:00 AM PDT" + branches: + include: + - release/2.1 + - release/6.0 + - release/7.0 + - main + always: true + parameters: # Choose whether to skip tests when running pipeline manually. - name: skipTests default: false displayName: Skip tests? type: boolean +# Parameters below are ignored in public builds. +# +# Choose whether to run the CodeQL3000 tasks. +# Manual builds align w/ official builds unless this parameter is true. +- name: runCodeQL3000 + default: false + displayName: Run CodeQL3000 tasks + type: boolean # Choose whether to enable binlogs when running pipeline manually. +# Binary logs are enabled by default in public builds and aren't designed to be disabled there. - name: produceBinlogs default: false displayName: Produce binlogs? type: boolean -# Choose whether to test source indexing. Ignored in public builds. +# Choose whether to test source indexing. # Will cause inaccessible links on https://source.dot.net/ unless commits are also available in GitHub. - name: testSourceIndexing default: false @@ -130,699 +150,751 @@ variables: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: _SignType value: test +- name: runCodeQL3000 + value: ${{ or(eq(variables['Build.Reason'], 'Schedule'), and(eq(variables['Build.Reason'], 'Manual'), eq(parameters.runCodeQL3000, 'true'))) }} stages: - stage: build displayName: Build jobs: - # Code check - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest', 'Manual')) }}: + - ${{ if and(ne(variables['System.TeamProject'], 'public'), eq(variables.runCodeQL3000, 'true')) }}: - template: jobs/default-build.yml parameters: - jobName: Code_check - jobDisplayName: Code check + jobName: build + jobDisplayName: Build and run CodeQL3000 agentOs: Windows + codeSign: false + # Component governance and SBOM creation are not needed here. Disable what Arcade would inject. + disableComponentGovernance: true + enableSbom: false + variables: + # Security analysis is included in normal runs. Disable its auto-injection. + - skipNugetSecurityAnalysis: true + # Do not let CodeQL3000 Extension gate scan frequency. + - Codeql.Cadence: 0 + # Enable CodeQL3000 unconditionally so it may be run on any branch. + - Codeql.Enabled: true + # Ignore the small amount of infrastructure Python code in this repo. + - Codeql.Language: cpp,csharp,java,javascript + - Codeql.ExcludePathPatterns: submodules + # Ignore test and infrastructure code. + - Codeql.SourceRoot: src + # CodeQL3000 needs this plumbed along as a variable to enable TSA. + - Codeql.TSAEnabled: ${{ eq(variables['Build.Reason'], 'Schedule') }} + # Default expects tsaoptions.json under SourceRoot. + - Codeql.TSAOptionsPath: '$(Build.SourcesDirectory)/.config/tsaoptions.json' + beforeBuild: + - task: CodeQL3000Init@0 + displayName: CodeQL Initialize + - script: "echo ##vso[build.addbuildtag]CodeQL3000" + displayName: 'Set CI CodeQL3000 tag' + condition: ne(variables.CODEQL_DIST,'') steps: - - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) - displayName: Run eng/scripts/CodeCheck.ps1 + - script: ./eng/build.cmd + -ci + -arch x64 + -all + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + /p:UseSharedCompilation=false + displayName: Build x64 + afterBuild: + - task: CodeQL3000Finalize@0 + displayName: CodeQL Finalize artifacts: - - name: Code_Check_Logs + - name: Build_Logs path: artifacts/log/ publishOnError: true includeForks: true - # Build Windows (x64/x86/arm64) - - template: jobs/default-build.yml - parameters: - codeSign: true - jobName: Windows_build - jobDisplayName: "Build: Windows x64/x86/arm64" - agentOs: Windows - steps: - - ${{ if notIn(variables['Build.Reason'], 'PullRequest') }}: - - script: "echo ##vso[build.addbuildtag]daily-build" - displayName: 'Set CI daily-build tag' - - # !!! NOTE !!! Some of these steps have disabled code signing. - # This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even - # if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing. - # The sign settings have been configured to - - script: ./eng/build.cmd - -ci - -arch x64 - -pack - -all - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - $(Windows64LogArgs) - displayName: Build x64 - - # Build the x86 shared framework - # This is going to actually build x86 native assets. - - script: ./eng/build.cmd - -ci - -noBuildRepoTasks - -arch x86 - -pack - -all - -noBuildJava - -noBuildNative - /p:OnlyPackPlatformSpecificPackages=true - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - $(Windows86LogArgs) - displayName: Build x86 - - # Build the arm64 shared framework - - script: ./eng/build.cmd - -ci - -noBuildRepoTasks - -arch arm64 - -sign - -pack - -noBuildJava - -noBuildNative - /p:DotNetSignType=$(_SignType) - /p:OnlyPackPlatformSpecificPackages=true - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - $(WindowsArm64LogArgs) - displayName: Build ARM64 - - # Submit a manual build (in public or internal project) to validate changes to site extensions. - - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - - script: .\src\SiteExtensions\build.cmd + - ${{ else }}: # regular build + # Code check + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest', 'Manual')) }}: + - template: jobs/default-build.yml + parameters: + jobName: Code_check + jobDisplayName: Code check + agentOs: Windows + steps: + - powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs) + displayName: Run eng/scripts/CodeCheck.ps1 + artifacts: + - name: Code_Check_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + + # Build Windows (x64/x86/arm64) + - template: jobs/default-build.yml + parameters: + codeSign: true + jobName: Windows_build + jobDisplayName: "Build: Windows x64/x86/arm64" + agentOs: Windows + steps: + - ${{ if notIn(variables['Build.Reason'], 'PullRequest') }}: + - script: "echo ##vso[build.addbuildtag]daily-build" + displayName: 'Set CI daily-build tag' + + # !!! NOTE !!! Some of these steps have disabled code signing. + # This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even + # if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing. + # The sign settings have been configured to + - script: ./eng/build.cmd + -ci + -arch x64 + -pack + -all + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + $(Windows64LogArgs) + displayName: Build x64 + + # Build the x86 shared framework + # This is going to actually build x86 native assets. + - script: ./eng/build.cmd -ci -noBuildRepoTasks + -arch x86 -pack - -noBuildDeps + -all + -noBuildJava -noBuildNative + /p:OnlyPackPlatformSpecificPackages=true $(_BuildArgs) $(_InternalRuntimeDownloadArgs) - displayName: Build SiteExtension - - # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If - # https://github.com/dotnet/arcade/issues/1957 is resolved, consider running code-signing inline with the other - # previous steps. Sign check is disabled because it is run in a separate step below, after installers are built. - - script: ./eng/build.cmd - -ci - -noBuildRepoTasks - -noBuildNative - -noBuild - -sign - /p:DotNetSignType=$(_SignType) - $(_BuildArgs) - $(WindowsSignLogArgs) - displayName: Code sign packages - - # Windows installers bundle x86/x64/arm64 assets - - script: ./eng/build.cmd - -ci - -noBuildRepoTasks - -sign - -buildInstallers - -noBuildNative - /p:DotNetSignType=$(_SignType) - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - $(WindowsInstallersLogArgs) - displayName: Build Installers - - # Windows installers bundle and sharedfx msi for arm64 - - script: ./eng/build.cmd - -ci - -noBuildRepoTasks - -arch arm64 - -sign - -buildInstallers - -noBuildNative - /p:DotNetSignType=$(_SignType) - /p:AssetManifestFileName=aspnetcore-win.xml - $(_BuildArgs) - $(_PublishArgs) - /p:PublishInstallerBaseVersion=true - $(_InternalRuntimeDownloadArgs) - $(WindowsArm64InstallersLogArgs) - displayName: Build ARM64 Installers - - artifacts: - - name: Windows_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Windows_Packages - path: artifacts/packages/ - - name: Windows_HostingBundle - path: artifacts/bin/WindowsHostingBundle - - name: Windows_ANCM_Msi - path: artifacts/bin/ANCMv2 - - name: Windows_ANCMIISExpress_Msi - path: artifacts/bin/AncmIISExpressV2 - - # Build Windows ARM - - template: jobs/default-build.yml - parameters: - codeSign: true - jobName: Windows_arm_build - jobDisplayName: "Build: Windows ARM" - agentOs: Windows - buildArgs: - -arch arm - -sign - -pack - -noBuildNodeJS - -noBuildJava - -binaryLog - /p:DotNetSignType=$(_SignType) - /p:OnlyPackPlatformSpecificPackages=true - /p:AssetManifestFileName=aspnetcore-win-arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(parameters.testSourceIndexing, 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - afterBuild: - - task: UseDotNet@2 - displayName: Use .NET Core sdk 3.1 - inputs: - packageType: sdk - version: 3.1.x - installationPath: $(Build.SourcesDirectory)/.dotnet - workingDirectory: $(Build.SourcesDirectory) - - powershell: . $(Build.SourcesDirectory)/activate.ps1; - dotnet tool install BinLogToSln - --version $(SourceIndexPackageVersion) - --add-source $(SourceIndexPackageSource) - --tool-path $(Build.SourcesDirectory)/.tools; - $(Build.SourcesDirectory)/.tools/BinLogToSln - -i $(Build.SourcesDirectory)/artifacts/log/Release/Build.binlog - -r $(Build.SourcesDirectory) - -n $(Build.Repository.Name) - -o $(Build.ArtifactStagingDirectory)/sourceIndex/ - displayName: Process binary log into indexable sln - installNodeJs: false - installJdk: false - artifacts: - - name: Windows_arm_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Windows_arm_Packages - path: artifacts/packages/ - - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(parameters.testSourceIndexing, 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - - name: Windows_arm_SourceIndex - path: $(Build.ArtifactStagingDirectory)/sourceIndex/ + $(Windows86LogArgs) + displayName: Build x86 - # Build MacOS arm64 - - template: jobs/default-build.yml - parameters: - jobName: MacOs_arm64_build - jobDisplayName: "Build: macOS arm64" - agentOs: macOs - buildArgs: - --arch arm64 - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - installNodeJs: false - artifacts: - - name: MacOS_arm64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: MacOS_arm64_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml - parameters: - inputName: MacOS_arm64 + # Build the arm64 shared framework + - script: ./eng/build.cmd + -ci + -noBuildRepoTasks + -arch arm64 + -sign + -pack + -noBuildJava + -noBuildNative + /p:DotNetSignType=$(_SignType) + /p:OnlyPackPlatformSpecificPackages=true + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + $(WindowsArm64LogArgs) + displayName: Build ARM64 + + # Submit a manual build (in public or internal project) to validate changes to site extensions. + - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + - script: .\src\SiteExtensions\build.cmd + -ci + -noBuildRepoTasks + -pack + -noBuildDeps + -noBuildNative + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Build SiteExtension + + # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If + # https://github.com/dotnet/arcade/issues/1957 is resolved, consider running code-signing inline with the other + # previous steps. Sign check is disabled because it is run in a separate step below, after installers are built. + - script: ./eng/build.cmd + -ci + -noBuildRepoTasks + -noBuildNative + -noBuild + -sign + /p:DotNetSignType=$(_SignType) + $(_BuildArgs) + $(WindowsSignLogArgs) + displayName: Code sign packages - # Build MacOS x64 - - template: jobs/default-build.yml - parameters: - jobName: MacOs_x64_build - jobDisplayName: "Build: macOS x64" - agentOs: macOs - buildArgs: - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-MacOS_x64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - installNodeJs: false - artifacts: - - name: MacOS_x64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: MacOS_x64_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml - parameters: - inputName: MacOS_x64 + # Windows installers bundle x86/x64/arm64 assets + - script: ./eng/build.cmd + -ci + -noBuildRepoTasks + -sign + -buildInstallers + -noBuildNative + /p:DotNetSignType=$(_SignType) + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + $(WindowsInstallersLogArgs) + displayName: Build Installers - # Build Linux x64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_x64_build - jobDisplayName: "Build: Linux x64" - agentOs: Linux - useHostedUbuntu: false - steps: - - script: ./eng/build.sh - --ci - --arch x64 - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - displayName: Run build.sh - - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs - -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - displayName: Build Debian installers - - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs - -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm - -p:AssetManifestFileName=aspnetcore-Linux_x64.xml + # Windows installers bundle and sharedfx msi for arm64 + - script: ./eng/build.cmd + -ci + -noBuildRepoTasks + -arch arm64 + -sign + -buildInstallers + -noBuildNative + /p:DotNetSignType=$(_SignType) + /p:AssetManifestFileName=aspnetcore-win.xml + $(_BuildArgs) + $(_PublishArgs) + /p:PublishInstallerBaseVersion=true + $(_InternalRuntimeDownloadArgs) + $(WindowsArm64InstallersLogArgs) + displayName: Build ARM64 Installers + + artifacts: + - name: Windows_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Windows_Packages + path: artifacts/packages/ + - name: Windows_HostingBundle + path: artifacts/bin/WindowsHostingBundle + - name: Windows_ANCM_Msi + path: artifacts/bin/ANCMv2 + - name: Windows_ANCMIISExpress_Msi + path: artifacts/bin/AncmIISExpressV2 + + # Build Windows ARM + - template: jobs/default-build.yml + parameters: + codeSign: true + jobName: Windows_arm_build + jobDisplayName: "Build: Windows ARM" + agentOs: Windows + buildArgs: + -arch arm + -sign + -pack + -noBuildNodeJS + -noBuildJava + -binaryLog + /p:DotNetSignType=$(_SignType) + /p:OnlyPackPlatformSpecificPackages=true + /p:AssetManifestFileName=aspnetcore-win-arm.xml $(_BuildArgs) $(_PublishArgs) $(_InternalRuntimeDownloadArgs) - displayName: Build RPM installers - installNodeJs: false - artifacts: - - name: Linux_x64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_x64_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_x64 + ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(parameters.testSourceIndexing, 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + afterBuild: + - task: UseDotNet@2 + displayName: Use .NET Core sdk 3.1 + inputs: + packageType: sdk + version: 3.1.x + installationPath: $(Build.SourcesDirectory)/.dotnet + workingDirectory: $(Build.SourcesDirectory) + - powershell: . $(Build.SourcesDirectory)/activate.ps1; + dotnet tool install BinLogToSln + --version $(SourceIndexPackageVersion) + --add-source $(SourceIndexPackageSource) + --tool-path $(Build.SourcesDirectory)/.tools; + $(Build.SourcesDirectory)/.tools/BinLogToSln + -i $(Build.SourcesDirectory)/artifacts/log/Release/Build.binlog + -r $(Build.SourcesDirectory) + -n $(Build.Repository.Name) + -o $(Build.ArtifactStagingDirectory)/sourceIndex/ + displayName: Process binary log into indexable sln + installNodeJs: false + installJdk: false + artifacts: + - name: Windows_arm_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Windows_arm_Packages + path: artifacts/packages/ + - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(parameters.testSourceIndexing, 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + - name: Windows_arm_SourceIndex + path: $(Build.ArtifactStagingDirectory)/sourceIndex/ - # Build Linux ARM - - template: jobs/default-build.yml - parameters: - jobName: Linux_arm_build - jobDisplayName: "Build: Linux ARM" - agentOs: Linux - buildArgs: - --arch arm - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - installNodeJs: false - artifacts: - - name: Linux_arm_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + # Build MacOS arm64 + - template: jobs/default-build.yml parameters: - inputName: Linux_arm - - # Build Linux ARM64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_arm64_build - jobDisplayName: "Build: Linux ARM64" - agentOs: Linux - steps: - - script: ./eng/build.sh - --ci - --arch arm64 - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - displayName: Run build.sh - - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs - -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm - -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml + jobName: MacOs_arm64_build + jobDisplayName: "Build: macOS arm64" + agentOs: macOs + buildArgs: + --arch arm64 + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml $(_BuildArgs) $(_PublishArgs) $(_InternalRuntimeDownloadArgs) - displayName: Build RPM installers - installNodeJs: false - artifacts: - - name: Linux_arm64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm64_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_arm64 + installNodeJs: false + artifacts: + - name: MacOS_arm64_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: MacOS_arm64_Packages + path: artifacts/packages/ - # Build Linux Musl x64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_x64_build - jobDisplayName: "Build: Linux Musl x64" - agentOs: Linux - container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-WithNode-20210910135833-c401c85 - buildArgs: - --arch x64 - --os-name linux-musl - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - installNodeJs: false - disableComponentGovernance: true - skipComponentGovernanceDetection: true - artifacts: - - name: Linux_musl_x64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_x64_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_musl_x64 + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: MacOS_arm64 - # Build Linux Musl ARM - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_arm_build - jobDisplayName: "Build: Linux Musl ARM" - agentOs: Linux - useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine-20211022152824-78f7860 - buildArgs: - --arch arm - --os-name linux-musl - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - installNodeJs: false - artifacts: - - name: Linux_musl_arm_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + # Build MacOS x64 + - template: jobs/default-build.yml parameters: - inputName: Linux_musl_arm + jobName: MacOs_x64_build + jobDisplayName: "Build: macOS x64" + agentOs: macOs + buildArgs: + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-MacOS_x64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + installNodeJs: false + artifacts: + - name: MacOS_x64_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: MacOS_x64_Packages + path: artifacts/packages/ - # Build Linux Musl ARM64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_arm64_build - jobDisplayName: "Build: Linux Musl ARM64" - agentOs: Linux - useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine-20211022152824-538077f - buildArgs: - --arch arm64 - --os-name linux-musl - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - installNodeJs: false - artifacts: - - name: Linux_musl_arm64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm64_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_musl_arm64 + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: MacOS_x64 - - ${{ if and(ne(parameters.skipTests, 'true'), or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest', 'Manual'))) }}: - # Test jobs + # Build Linux x64 - template: jobs/default-build.yml parameters: - jobName: Windows_Test - jobDisplayName: "Test: Windows Server x64" - agentOs: Windows - isAzDOTestingJob: true - # Just uploading artifacts/logs/ files can take 15 minutes. Doubling the cancel timeout for this job. - cancelTimeoutInMinutes: 30 - buildArgs: -all -pack -test -binaryLog /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true - /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false - $(_InternalRuntimeDownloadArgs) - beforeBuild: - - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" - displayName: Setup IISExpress test certificates and schema + jobName: Linux_x64_build + jobDisplayName: "Build: Linux x64" + agentOs: Linux + useHostedUbuntu: false + steps: + - script: ./eng/build.sh + --ci + --arch x64 + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Run build.sh + - script: git clean -xfd src/**/obj/; + ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Build Debian installers + - script: git clean -xfd src/**/obj/; + ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm + -p:AssetManifestFileName=aspnetcore-Linux_x64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Build RPM installers + installNodeJs: false artifacts: - - name: Windows_Test_Logs + - name: Linux_x64_Logs path: artifacts/log/ publishOnError: true includeForks: true - - name: Windows_Test_Results - path: artifacts/TestResults/ + - name: Linux_x64_Packages + path: artifacts/packages/ + + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_x64 + + # Build Linux ARM + - template: jobs/default-build.yml + parameters: + jobName: Linux_arm_build + jobDisplayName: "Build: Linux ARM" + agentOs: Linux + buildArgs: + --arch arm + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_arm.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + installNodeJs: false + artifacts: + - name: Linux_arm_Logs + path: artifacts/log/ publishOnError: true includeForks: true + - name: Linux_arm_Packages + path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_arm + + # Build Linux ARM64 - template: jobs/default-build.yml parameters: - jobName: MacOS_Test - jobDisplayName: "Test: macOS" - agentOs: macOS - timeoutInMinutes: 240 - isAzDOTestingJob: true - buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) - beforeBuild: - - bash: "./eng/scripts/install-nginx-mac.sh" - displayName: Installing Nginx + jobName: Linux_arm64_build + jobDisplayName: "Build: Linux ARM64" + agentOs: Linux + steps: + - script: ./eng/build.sh + --ci + --arch arm64 + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Run build.sh + - script: git clean -xfd src/**/obj/; + ./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs + -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm + -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Build RPM installers + installNodeJs: false artifacts: - - name: MacOS_Test_Logs + - name: Linux_arm64_Logs path: artifacts/log/ publishOnError: true includeForks: true - - name: MacOS_Test_Results - path: artifacts/TestResults/ + - name: Linux_arm64_Packages + path: artifacts/packages/ + + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_arm64 + + # Build Linux Musl x64 + - template: jobs/default-build.yml + parameters: + jobName: Linux_musl_x64_build + jobDisplayName: "Build: Linux Musl x64" + agentOs: Linux + container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-WithNode-20210910135833-c401c85 + buildArgs: + --arch x64 + --os-name linux-musl + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + installNodeJs: false + disableComponentGovernance: true + artifacts: + - name: Linux_musl_x64_Logs + path: artifacts/log/ publishOnError: true includeForks: true + - name: Linux_musl_x64_Packages + path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_x64 + + # Build Linux Musl ARM - template: jobs/default-build.yml parameters: - jobName: Linux_Test - jobDisplayName: "Test: Ubuntu x64" + jobName: Linux_musl_arm_build + jobDisplayName: "Build: Linux Musl ARM" agentOs: Linux - isAzDOTestingJob: true useHostedUbuntu: false - buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) - beforeBuild: - - bash: "./eng/scripts/install-nginx-linux.sh" - displayName: Installing Nginx - - bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p" - displayName: Increase inotify limit + container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine-20211022152824-78f7860 + buildArgs: + --arch arm + --os-name linux-musl + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + installNodeJs: false artifacts: - - name: Linux_Test_Logs + - name: Linux_musl_arm_Logs path: artifacts/log/ publishOnError: true includeForks: true - - name: Linux_Test_Results - path: artifacts/TestResults/ - publishOnError: true - includeForks: true + - name: Linux_musl_arm_Packages + path: artifacts/packages/ - # Helix x64 + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_arm + + # Build Linux Musl ARM64 - template: jobs/default-build.yml parameters: - jobName: Helix_x64 - jobDisplayName: 'Tests: Helix x64' - agentOs: Windows - timeoutInMinutes: 240 - steps: - # Build the shared framework - - script: ./eng/build.cmd -ci -nobl -all -pack -arch x64 - /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) - displayName: Build shared fx - # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. - - script: ./eng/build.cmd -ci -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test - -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true - /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) - displayName: Run build.cmd helix target - env: - HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues - SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops - + jobName: Linux_musl_arm64_build + jobDisplayName: "Build: Linux Musl ARM64" + agentOs: Linux + useHostedUbuntu: false + container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine-20211022152824-538077f + buildArgs: + --arch arm64 + --os-name linux-musl + --pack + --all + --no-build-nodejs + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + installNodeJs: false artifacts: - - name: Helix_logs + - name: Linux_musl_arm64_Logs path: artifacts/log/ publishOnError: true includeForks: true + - name: Linux_musl_arm64_Packages + path: artifacts/packages/ + + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_arm64 + + - ${{ if and(ne(parameters.skipTests, 'true'), or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest', 'Manual'))) }}: + # Test jobs + - template: jobs/default-build.yml + parameters: + jobName: Windows_Test + jobDisplayName: "Test: Windows Server x64" + agentOs: Windows + isAzDOTestingJob: true + # Just uploading artifacts/logs/ files can take 15 minutes. Doubling the cancel timeout for this job. + cancelTimeoutInMinutes: 30 + buildArgs: -all -pack -test -binaryLog /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true + /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false + $(_InternalRuntimeDownloadArgs) + beforeBuild: + - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" + displayName: Setup IISExpress test certificates and schema + artifacts: + - name: Windows_Test_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Windows_Test_Results + path: artifacts/TestResults/ + publishOnError: true + includeForks: true + + - template: jobs/default-build.yml + parameters: + jobName: MacOS_Test + jobDisplayName: "Test: macOS" + agentOs: macOS + timeoutInMinutes: 240 + isAzDOTestingJob: true + buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) + beforeBuild: + - bash: "./eng/scripts/install-nginx-mac.sh" + displayName: Installing Nginx + artifacts: + - name: MacOS_Test_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: MacOS_Test_Results + path: artifacts/TestResults/ + publishOnError: true + includeForks: true + + - template: jobs/default-build.yml + parameters: + jobName: Linux_Test + jobDisplayName: "Test: Ubuntu x64" + agentOs: Linux + isAzDOTestingJob: true + useHostedUbuntu: false + buildArgs: --all --test --binaryLog "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs) + beforeBuild: + - bash: "./eng/scripts/install-nginx-linux.sh" + displayName: Installing Nginx + - bash: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p" + displayName: Increase inotify limit + artifacts: + - name: Linux_Test_Logs + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_Test_Results + path: artifacts/TestResults/ + publishOnError: true + includeForks: true + + # Helix x64 + - template: jobs/default-build.yml + parameters: + jobName: Helix_x64 + jobDisplayName: 'Tests: Helix x64' + agentOs: Windows + timeoutInMinutes: 240 + steps: + # Build the shared framework + - script: ./eng/build.cmd -ci -nobl -all -pack -arch x64 + /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) + displayName: Build shared fx + # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. + - script: ./eng/build.cmd -ci -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test + -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true + /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) + displayName: Run build.cmd helix target + env: + HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues + SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops - # Source build - - template: /eng/common/templates/job/source-build.yml - parameters: - platform: - name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-20220809204800-17a4aab' - buildScript: './eng/build.sh $(_PublishArgs) --no-build-repo-tasks' - skipPublishValidation: true - timeoutInMinutes: 120 - - # Publish to the BAR and perform source indexing. Wait until everything else is done. - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/common/templates/job/publish-build-assets.yml + artifacts: + - name: Helix_logs + path: artifacts/log/ + publishOnError: true + includeForks: true + + # Source build + - template: /eng/common/templates/job/source-build.yml parameters: - dependsOn: - - Windows_build - - Windows_arm_build - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - CodeSign_Xplat_MacOS_arm64 - - CodeSign_Xplat_MacOS_x64 - - CodeSign_Xplat_Linux_x64 - - CodeSign_Xplat_Linux_arm - - CodeSign_Xplat_Linux_arm64 - - CodeSign_Xplat_Linux_musl_x64 - - CodeSign_Xplat_Linux_musl_arm - - CodeSign_Xplat_Linux_musl_arm64 - - ${{ if eq(variables.PostBuildSign, 'true') }}: - - MacOs_arm64_build - - MacOs_x64_build - - Linux_x64_build - - Linux_arm_build - - Linux_arm64_build - - Linux_musl_x64_build - - Linux_musl_arm_build - - Linux_musl_arm64_build - # In addition to the dependencies above that provide assets, ensure the build was successful overall. - - ${{ if in(variables['Build.Reason'], 'Manual') }}: - - Code_check - - ${{ if ne(parameters.skipTests, 'true') }}: - - Windows_Test - - MacOS_Test - - Linux_Test - - Helix_x64 - - Source_Build_Managed - pool: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals 1es-windows-2019 - publishUsingPipelines: ${{ variables._PublishUsingPipelines }} - enablePublishBuildArtifacts: true # publish artifacts/log files - - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(parameters.testSourceIndexing, 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: - - job: SourceIndexUpload - displayName: Upload indexable solution - dependsOn: - - Windows_arm_build - # In addition to the dependency above that provides assets, ensure the build was successful overall. - - Windows_build - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - CodeSign_Xplat_MacOS_arm64 - - CodeSign_Xplat_MacOS_x64 - - CodeSign_Xplat_Linux_x64 - - CodeSign_Xplat_Linux_arm - - CodeSign_Xplat_Linux_arm64 - - CodeSign_Xplat_Linux_musl_x64 - - CodeSign_Xplat_Linux_musl_arm - - CodeSign_Xplat_Linux_musl_arm64 - - ${{ if eq(variables.PostBuildSign, 'true') }}: - - MacOs_arm64_build - - MacOs_x64_build - - Linux_x64_build - - Linux_arm_build - - Linux_arm64_build - - Linux_musl_x64_build - - Linux_musl_arm_build - - Linux_musl_arm64_build - - ${{ if in(variables['Build.Reason'], 'Manual') }}: - - Code_check - - ${{ if ne(parameters.skipTests, 'true') }}: - - Windows_Test - - MacOS_Test - - Linux_Test - - Helix_x64 - - Source_Build_Managed - pool: - name: NetCore1ESPool-Svc-Internal - # Visual Studio Enterprise - no BuildTools agents exist internally and job must run on Windows - demands: ImageOverride -equals 1es-windows-2019 - steps: - - task: DownloadBuildArtifacts@0 - inputs: - artifactName: Windows_arm_SourceIndex - cleanDestinationFolder: true - # Ignore repository's global.json and any existing .NET SDK. - - task: UseDotNet@2 - displayName: Use .NET Core sdk 3.1 - inputs: - packageType: sdk - version: 3.1.x - installationPath: $(Agent.TempDirectory)/.dotnet + platform: + name: 'Managed' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-20220809204800-17a4aab' + buildScript: './eng/build.sh $(_PublishArgs) --no-build-repo-tasks' + skipPublishValidation: true + timeoutInMinutes: 120 + + # Publish to the BAR and perform source indexing. Wait until everything else is done. + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: /eng/common/templates/job/publish-build-assets.yml + parameters: + dependsOn: + - Windows_build + - Windows_arm_build + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - CodeSign_Xplat_MacOS_arm64 + - CodeSign_Xplat_MacOS_x64 + - CodeSign_Xplat_Linux_x64 + - CodeSign_Xplat_Linux_arm + - CodeSign_Xplat_Linux_arm64 + - CodeSign_Xplat_Linux_musl_x64 + - CodeSign_Xplat_Linux_musl_arm + - CodeSign_Xplat_Linux_musl_arm64 + - ${{ if eq(variables.PostBuildSign, 'true') }}: + - MacOs_arm64_build + - MacOs_x64_build + - Linux_x64_build + - Linux_arm_build + - Linux_arm64_build + - Linux_musl_x64_build + - Linux_musl_arm_build + - Linux_musl_arm64_build + # In addition to the dependencies above that provide assets, ensure the build was successful overall. + - ${{ if in(variables['Build.Reason'], 'Manual') }}: + - Code_check + - ${{ if ne(parameters.skipTests, 'true') }}: + - Windows_Test + - MacOS_Test + - Linux_Test + - Helix_x64 + - Source_Build_Managed + pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals 1es-windows-2019 + publishUsingPipelines: ${{ variables._PublishUsingPipelines }} + enablePublishBuildArtifacts: true # publish artifacts/log files + - ${{ if and(ne(variables['System.TeamProject'], 'public'), or(eq(parameters.testSourceIndexing, 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}: + - job: SourceIndexUpload + displayName: Upload indexable solution + dependsOn: + - Windows_arm_build + # In addition to the dependency above that provides assets, ensure the build was successful overall. + - Windows_build + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - CodeSign_Xplat_MacOS_arm64 + - CodeSign_Xplat_MacOS_x64 + - CodeSign_Xplat_Linux_x64 + - CodeSign_Xplat_Linux_arm + - CodeSign_Xplat_Linux_arm64 + - CodeSign_Xplat_Linux_musl_x64 + - CodeSign_Xplat_Linux_musl_arm + - CodeSign_Xplat_Linux_musl_arm64 + - ${{ if eq(variables.PostBuildSign, 'true') }}: + - MacOs_arm64_build + - MacOs_x64_build + - Linux_x64_build + - Linux_arm_build + - Linux_arm64_build + - Linux_musl_x64_build + - Linux_musl_arm_build + - Linux_musl_arm64_build + - ${{ if in(variables['Build.Reason'], 'Manual') }}: + - Code_check + - ${{ if ne(parameters.skipTests, 'true') }}: + - Windows_Test + - MacOS_Test + - Linux_Test + - Helix_x64 + - Source_Build_Managed + pool: + name: NetCore1ESPool-Svc-Internal + # Visual Studio Enterprise - no BuildTools agents exist internally and job must run on Windows + demands: ImageOverride -equals 1es-windows-2019 + steps: + - task: DownloadBuildArtifacts@0 + inputs: + artifactName: Windows_arm_SourceIndex + cleanDestinationFolder: true + # Ignore repository's global.json and any existing .NET SDK. + - task: UseDotNet@2 + displayName: Use .NET Core sdk 3.1 + inputs: + packageType: sdk + version: 3.1.x + installationPath: $(Agent.TempDirectory)/.dotnet + workingDirectory: $(Agent.TempDirectory) + - script: $(Agent.TempDirectory)/.dotnet/dotnet tool install UploadIndexStage1 + --version $(SourceIndexPackageVersion) + --add-source $(SourceIndexPackageSource) + --tool-path $(Agent.TempDirectory)/.tools && + $(Agent.TempDirectory)/.tools/UploadIndexStage1 + -i $(System.ArtifactsDirectory)/Windows_arm_SourceIndex/ + -n $(Build.Repository.Name) + displayName: Upload indexable solution workingDirectory: $(Agent.TempDirectory) - - script: $(Agent.TempDirectory)/.dotnet/dotnet tool install UploadIndexStage1 - --version $(SourceIndexPackageVersion) - --add-source $(SourceIndexPackageSource) - --tool-path $(Agent.TempDirectory)/.tools && - $(Agent.TempDirectory)/.tools/UploadIndexStage1 - -i $(System.ArtifactsDirectory)/Windows_arm_SourceIndex/ - -n $(Build.Repository.Name) - displayName: Upload indexable solution - workingDirectory: $(Agent.TempDirectory) - env: - BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url) + env: + BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url) -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(variables.runCodeQL3000, 'true')) }}: - template: /eng/common/templates/post-build/post-build.yml parameters: publishingInfraVersion: 3 diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index b7d491276187..5d5f835fd937 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -33,13 +33,15 @@ # This build definition is enabled for code signing. (Only applies to Windows) # buildDirectory: string # Specifies what directory to run build.sh/cmd -# skipComponentGovernanceDetection: boolean -# Determines if component governance detection can be skipped # isAzDOTestingJob: boolean # Determines if this job runs tests on the AzDO build agent. Controls some (currently Windows-only) # installations and enables test publication (unless enablePublishTestResults is overridden). # enablePublishTestResults: boolean # Determines if test results should be published. Defaults to the isAzDOTestingJob setting. +# enableSbom: boolean +# Determines if an SBOM should be created. Defaults to true. Ignored in public builds. +# variables: [array] +# Job-specific variables. Defined using either name/value pairs or a variable list (using name or group syntax). # # See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details # @@ -57,9 +59,10 @@ parameters: condition: '' codeSign: false buildDirectory: $(System.DefaultWorkingDirectory)/eng/ - skipComponentGovernanceDetection: false isAzDOTestingJob: false enablePublishTestResults: '' + enableSbom: true + variables: [] configuration: 'Release' container: '' @@ -97,6 +100,7 @@ jobs: testResultsFormat: xUnit # Have no vsTest results in any job. mergeTestResults: true testRunTitle: ${{ parameters.testRunTitle }} + enableSbom: ${{ parameters.enableSbom }} enableTelemetry: true helixRepo: dotnet/aspnetcore helixType: build.product/ @@ -157,6 +161,28 @@ jobs: - LANGUAGE: 'en_US.UTF-8' # Log environment variables in binary logs to ease debugging - MSBUILDLOGALLENVIRONMENTVARIABLES: true + # Rely on task Arcade injects, not auto-injected build step. + - skipComponentGovernanceDetection: true + - ${{ each variable in parameters.variables }}: + # handle a variable list using "name" and "value" properties + # example: + # - name: [key] + # value: [value] + - ${{ if ne(variable.name, '') }}: + - name: ${{ variable.name }} + value: ${{ variable.value }} + + # handle variable groups + - ${{ if ne(variable.group, '') }}: + - group: ${{ variable.group }} + + # handle name/value pairs (converting them into variable list entries) + # example: + # - [name]: [value] + - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}: + - ${{ each pair in variable }}: + - name: ${{ pair.key }} + value: ${{ pair.value }} steps: - ${{ if ne(parameters.agentOs, 'Windows') }}: - script: df -h @@ -268,12 +294,6 @@ jobs: continueOnError: true condition: always() - # Run component detection after all successful Build:* jobs unless overridden e.g. for Alpine build. - # Make sure auto-injected component detection does _not_ execute in other jobs nor when overridden. - - ${{ if or(not(startsWith(parameters.jobDisplayName, 'Build:')), eq(parameters.skipComponentGovernanceDetection, 'true')) }}: - - script: echo "##vso[task.setvariable variable=CG_RAN]true" - displayName: 'Skip Component Detection' - - ${{ each artifact in parameters.artifacts }}: - task: PublishBuildArtifacts@1 displayName: Upload artifacts from ${{ artifact.path }} diff --git a/.config/tsaoptions.json b/.config/tsaoptions.json new file mode 100644 index 000000000000..1688609163cf --- /dev/null +++ b/.config/tsaoptions.json @@ -0,0 +1,12 @@ +{ + "areaPath": "DevDiv\\ASP.NET Core", + "codebaseName": "AspNetCore", + "instanceUrl": "https://devdiv.visualstudio.com/", + "iterationPath": "DevDiv", + "notificationAliases": [ + "aspnetcore-build@microsoft.com" + ], + "projectName": "DEVDIV", + "repositoryName": "AspNetCore", + "template": "TFSDEVDIV" +} From a79ce1939229ad72ff3d3ddf755550546ce785f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 20:08:58 -0700 Subject: [PATCH 05/35] Fix XML Docs for Microsoft.AspNetCore.Http.Results (#44488) Co-authored-by: Nikita Balabaev --- src/Http/Http.Results/src/Results.cs | 48 +++++++++++++++++++++------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/src/Http/Http.Results/src/Results.cs b/src/Http/Http.Results/src/Results.cs index 66b7e3474e5d..1e9c55ae1de9 100644 --- a/src/Http/Http.Results/src/Results.cs +++ b/src/Http/Http.Results/src/Results.cs @@ -424,10 +424,18 @@ public static IResult File( /// /// Redirects to the specified . /// - /// When and are set, sets the status code. - /// When is set, sets the status code. - /// When is set, sets the status code. - /// Otherwise, configures . + /// + /// When and are set, sets the status code. + /// + /// + /// When is set, sets the status code. + /// + /// + /// When is set, sets the status code. + /// + /// + /// Otherwise, configures . + /// /// /// /// The URL to redirect to. @@ -440,10 +448,18 @@ public static IResult Redirect(string url, bool permanent = false, bool preserve /// /// Redirects to the specified . /// - /// When and are set, sets the status code. - /// When is set, sets the status code. - /// When is set, sets the status code. - /// Otherwise, configures . + /// + /// When and are set, sets the status code. + /// + /// + /// When is set, sets the status code. + /// + /// + /// When is set, sets the status code. + /// + /// + /// Otherwise, configures . + /// /// /// /// The local URL to redirect to. @@ -456,10 +472,18 @@ public static IResult LocalRedirect(string localUrl, bool permanent = false, boo /// /// Redirects to the specified route. /// - /// When and are set, sets the status code. - /// When is set, sets the status code. - /// When is set, sets the status code. - /// Otherwise, configures . + /// + /// When and are set, sets the status code. + /// + /// + /// When is set, sets the status code. + /// + /// + /// When is set, sets the status code. + /// + /// + /// Otherwise, configures . + /// /// /// /// The name of the route. From 761eec97e6c8a7c9e4f5f84d80d39f480dfb6cef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 20:10:18 -0700 Subject: [PATCH 06/35] [release/7.0] Fixing XML documentation (#44523) * Update IHttpRequestFeature.cs * Update ApiParameterDescription.cs * Update IProblemDetailsService.cs * Update ApiConventionApplicationModelConvention.cs * Update CircuitHandler.cs * Update CorsPolicyBuilder.cs * Update TypedResults.cs Co-authored-by: Bruno Oliveira --- .../Server/src/Circuits/CircuitHandler.cs | 12 +++++------ .../ProblemDetails/IProblemDetailsService.cs | 6 ++++-- .../Http.Features/src/IHttpRequestFeature.cs | 4 ++-- src/Http/Http.Results/src/TypedResults.cs | 20 +++++++++---------- .../src/Infrastructure/CorsPolicyBuilder.cs | 6 +++--- .../ApiExplorer/ApiParameterDescription.cs | 6 +++--- ...ApiConventionApplicationModelConvention.cs | 4 ++-- 7 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/Components/Server/src/Circuits/CircuitHandler.cs b/src/Components/Server/src/Circuits/CircuitHandler.cs index 5dfcd4860b6c..61045dbf587b 100644 --- a/src/Components/Server/src/Circuits/CircuitHandler.cs +++ b/src/Components/Server/src/Circuits/CircuitHandler.cs @@ -6,20 +6,20 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits; /// /// A allows running code during specific lifetime events of a . /// -/// +/// /// is invoked after an initial circuit to the client /// has been established. -/// -/// +/// +/// /// is invoked immediately after the completion of /// . In addition, the method is invoked each time a connection is re-established /// with a client after it's been dropped. is invoked each time a connection /// is dropped. -/// -/// +/// +/// /// is invoked prior to the server evicting the circuit to the client. /// Application users may use this event to save state for a client that can be later rehydrated. -/// +/// /// /// public abstract class CircuitHandler diff --git a/src/Http/Http.Abstractions/src/ProblemDetails/IProblemDetailsService.cs b/src/Http/Http.Abstractions/src/ProblemDetails/IProblemDetailsService.cs index 564ee29403ad..038049680bde 100644 --- a/src/Http/Http.Abstractions/src/ProblemDetails/IProblemDetailsService.cs +++ b/src/Http/Http.Abstractions/src/ProblemDetails/IProblemDetailsService.cs @@ -16,8 +16,10 @@ public interface IProblemDetailsService /// The associated with the current request/response. /// The registered services /// are processed in sequence and the processing is completed when: - /// One of them reports that the response was written successfully, or. - /// All were executed and none of them was able to write the response successfully. + /// + /// One of them reports that the response was written successfully, or. + /// All were executed and none of them was able to write the response successfully. + /// /// ValueTask WriteAsync(ProblemDetailsContext context); } diff --git a/src/Http/Http.Features/src/IHttpRequestFeature.cs b/src/Http/Http.Features/src/IHttpRequestFeature.cs index 3f8f23a98484..d5cdfef4b2e5 100644 --- a/src/Http/Http.Features/src/IHttpRequestFeature.cs +++ b/src/Http/Http.Features/src/IHttpRequestFeature.cs @@ -71,8 +71,8 @@ public interface IHttpRequestFeature /// /// The values are not split or merged across header lines. E.g. The following headers: /// - /// HeaderA: value1, value2 - /// HeaderA: value3 + /// HeaderA: value1, value2 + /// HeaderA: value3 /// /// Result in Headers["HeaderA"] = { "value1, value2", "value3" } /// diff --git a/src/Http/Http.Results/src/TypedResults.cs b/src/Http/Http.Results/src/TypedResults.cs index 31821d062a75..592973f32182 100644 --- a/src/Http/Http.Results/src/TypedResults.cs +++ b/src/Http/Http.Results/src/TypedResults.cs @@ -543,9 +543,9 @@ public static VirtualFileHttpResult VirtualFile( /// /// Redirects to the specified . /// - /// When and are set, sets the status code. - /// When is set, sets the status code. - /// When is set, sets the status code. + /// When and are set, sets the status code. + /// When is set, sets the status code. + /// When is set, sets the status code. /// Otherwise, configures . /// /// @@ -566,9 +566,9 @@ public static RedirectHttpResult Redirect(string url, bool permanent = false, bo /// /// Redirects to the specified . /// - /// When and are set, sets the status code. - /// When is set, sets the status code. - /// When is set, sets the status code. + /// When and are set, sets the status code. + /// When is set, sets the status code. + /// When is set, sets the status code. /// Otherwise, configures . /// /// @@ -589,10 +589,10 @@ public static RedirectHttpResult LocalRedirect(string localUrl, bool permanent = /// /// Redirects to the specified route. /// - /// When and are set, sets the status code. - /// When is set, sets the status code. - /// When is set, sets the status code. - /// Otherwise, configures . + /// When and are set, sets the status code. + /// When is set, sets the status code. + /// When is set, sets the status code. + /// Otherwise, configures . /// /// /// The name of the route. diff --git a/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs b/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs index efd777ae763d..68291bbfe115 100644 --- a/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs +++ b/src/Middleware/CORS/src/Infrastructure/CorsPolicyBuilder.cs @@ -41,13 +41,13 @@ public CorsPolicyBuilder(CorsPolicy policy) /// the normalization performed by the browser on the value sent in the ORIGIN header. /// /// - /// If the specified origin has an internationalized domain name (IDN), the punycoded value is used. If the origin + /// If the specified origin has an internationalized domain name (IDN), the punycoded value is used. If the origin /// specifies a default port (e.g. 443 for HTTPS or 80 for HTTP), this will be dropped as part of normalization. /// Finally, the scheme and punycoded host name are culture invariant lower cased before being added to the - /// collection. + /// collection. /// /// - /// For all other origins, normalization involves performing a culture invariant lower casing of the host name. + /// For all other origins, normalization involves performing a culture invariant lower casing of the host name. /// /// /// diff --git a/src/Mvc/Mvc.Abstractions/src/ApiExplorer/ApiParameterDescription.cs b/src/Mvc/Mvc.Abstractions/src/ApiExplorer/ApiParameterDescription.cs index a06e7e5f18c6..449a5636ee61 100644 --- a/src/Mvc/Mvc.Abstractions/src/ApiExplorer/ApiParameterDescription.cs +++ b/src/Mvc/Mvc.Abstractions/src/ApiExplorer/ApiParameterDescription.cs @@ -52,9 +52,9 @@ public class ApiParameterDescription /// /// A parameter is considered required if /// - /// it's bound from the request body (). - /// it's a required route value. - /// it has annotations (e.g. BindRequiredAttribute) that indicate it's required. + /// it's bound from the request body (). + /// it's a required route value. + /// it has annotations (e.g. BindRequiredAttribute) that indicate it's required. /// /// public bool IsRequired { get; set; } diff --git a/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs b/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs index cba692149f27..164683ebd346 100644 --- a/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs +++ b/src/Mvc/Mvc.Core/src/ApplicationModels/ApiConventionApplicationModelConvention.cs @@ -10,8 +10,8 @@ namespace Microsoft.AspNetCore.Mvc.ApplicationModels; /// /// An that discovers /// -/// from applied or . -/// that applies to the action. +/// from applied or . +/// that applies to the action. /// /// public class ApiConventionApplicationModelConvention : IActionModelConvention From 8350b948d04cd04dcd2f0628c8e04ba17b902d9b Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Thu, 3 Nov 2022 20:10:49 -0700 Subject: [PATCH 07/35] [7.0] Limit the hpack buffer resize (#44644) * Limit the hpack buffer resize #44643 * More resizes --- .../runtime/Http2/Hpack/HPackDecoder.cs | 4 +-- .../runtime/Http2/HPackDecoderTest.cs | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/Shared/runtime/Http2/Hpack/HPackDecoder.cs b/src/Shared/runtime/Http2/Hpack/HPackDecoder.cs index cefb377f40c0..fb8739999a57 100644 --- a/src/Shared/runtime/Http2/Hpack/HPackDecoder.cs +++ b/src/Shared/runtime/Http2/Hpack/HPackDecoder.cs @@ -577,7 +577,7 @@ private void OnStringLength(int length, State nextState) throw new HPackDecodingException(SR.Format(SR.net_http_headers_exceeded_length, _maxHeadersLength)); } - _stringOctets = new byte[Math.Max(length, _stringOctets.Length * 2)]; + _stringOctets = new byte[Math.Max(length, Math.Min(_stringOctets.Length * 2, _maxHeadersLength))]; } _stringLength = length; @@ -625,7 +625,7 @@ private void EnsureStringCapacity(ref byte[] dst) { if (dst.Length < _stringLength) { - dst = new byte[Math.Max(_stringLength, dst.Length * 2)]; + dst = new byte[Math.Max(_stringLength, Math.Min(dst.Length * 2, _maxHeadersLength))]; } } diff --git a/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs b/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs index e5f3c3b698e2..b7f4c19072a6 100644 --- a/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs +++ b/src/Shared/test/Shared.Tests/runtime/Http2/HPackDecoderTest.cs @@ -493,6 +493,41 @@ public void DecodesStringLength_LimitConfigurable() Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); } + [Fact] + public void DecodesStringLength_ExceedsLimit_Throws() + { + HPackDecoder decoder = new HPackDecoder(DynamicTableInitialMaxSize, MaxHeaderFieldSize + 1); + string string8191 = new string('a', MaxHeaderFieldSize - 1); + string string8193 = new string('a', MaxHeaderFieldSize + 1); + string string8194 = new string('a', MaxHeaderFieldSize + 2); + + var bytes = new byte[3]; + var success = IntegerEncoder.Encode(8194, 7, bytes, out var written); + + byte[] encoded = _literalHeaderFieldWithoutIndexingNewName + .Concat(new byte[] { 0x7f, 0x80, 0x3f }) // 8191 encoded with 7-bit prefix, no Huffman encoding + .Concat(Encoding.ASCII.GetBytes(string8191)) + .Concat(new byte[] { 0x7f, 0x80, 0x3f }) // 8191 encoded with 7-bit prefix, no Huffman encoding + .Concat(Encoding.ASCII.GetBytes(string8191)) + .Concat(_literalHeaderFieldWithoutIndexingNewName) + .Concat(new byte[] { 0x7f, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix, no Huffman encoding + .Concat(Encoding.ASCII.GetBytes(string8193)) + .Concat(new byte[] { 0x7f, 0x82, 0x3f }) // 8193 encoded with 7-bit prefix, no Huffman encoding + .Concat(Encoding.ASCII.GetBytes(string8193)) + .Concat(_literalHeaderFieldWithoutIndexingNewName) + .Concat(new byte[] { 0x7f, 0x83, 0x3f }) // 8194 encoded with 7-bit prefix, no Huffman encoding + .Concat(Encoding.ASCII.GetBytes(string8194)) + .Concat(new byte[] { 0x7f, 0x83, 0x3f }) // 8194 encoded with 7-bit prefix, no Huffman encoding + .Concat(Encoding.ASCII.GetBytes(string8194)) + .ToArray(); + + var ex = Assert.Throws(() => decoder.Decode(encoded, endHeaders: true, handler: _handler)); + Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize + 1), ex.Message); + Assert.Equal(string8191, _handler.DecodedHeaders[string8191]); + Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); + Assert.False(_handler.DecodedHeaders.ContainsKey(string8194)); + } + [Fact] public void DecodesStringLength_IndividualBytes() { From f490fe4b6def8e967897d019a5dc5f03b3a7cb1e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 20:11:36 -0700 Subject: [PATCH 08/35] [release/7.0] Send 431 when HTTP/2&3 headers are too large or many (#44767) * Send 431 when HTTP/2 headers are too large or many #17861 * Send 431 when HTTP/2 headers are too large or many #33622 * Fix test encoder * PR feedback * Rework count enforcement Co-authored-by: Chris R --- .../Core/src/Internal/Http/HttpProtocol.cs | 6 +- .../src/Internal/Http2/Http2Connection.cs | 8 ++- .../Core/src/Internal/Http2/Http2Stream.cs | 17 +++++ .../Core/src/Internal/Http3/Http3Stream.cs | 22 +++++- .../Core/test/Http1/Http1ConnectionTests.cs | 1 + .../shared/test/Http3/Http3InMemory.cs | 5 +- .../Http2/Http2ConnectionTests.cs | 14 +++- .../Http2/Http2StreamTests.cs | 72 +++++++++++++++++++ .../Http2/Http2TestBase.cs | 2 + .../Http3/Http3StreamTests.cs | 71 +++++++++++++++++- .../Http3/Http3TestBase.cs | 2 + .../HttpClientHttp2InteropTests.cs | 6 +- 12 files changed, 209 insertions(+), 17 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs index 8aa61f383167..1ae6112104d9 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs @@ -63,6 +63,8 @@ internal abstract partial class HttpProtocol : IHttpResponseControl private string? _requestId; private int _requestHeadersParsed; + // See MaxRequestHeaderCount, enforced during parsing and may be more relaxed to avoid connection faults. + protected int _eagerRequestHeadersParsedLimit; private long _responseBytesWritten; @@ -107,6 +109,7 @@ public void Initialize(HttpConnectionContext context) public long? MaxRequestBodySize { get; set; } public MinDataRate? MinRequestBodyDataRate { get; set; } public bool AllowSynchronousIO { get; set; } + protected int RequestHeadersParsed => _requestHeadersParsed; /// /// The request id. @@ -416,6 +419,7 @@ public void Reset() Output?.Reset(); _requestHeadersParsed = 0; + _eagerRequestHeadersParsedLimit = ServerOptions.Limits.MaxRequestHeaderCount; _responseBytesWritten = 0; @@ -546,7 +550,7 @@ public void OnTrailer(ReadOnlySpan name, ReadOnlySpan value) private void IncrementRequestHeadersCount() { _requestHeadersParsed++; - if (_requestHeadersParsed > ServerOptions.Limits.MaxRequestHeaderCount) + if (_requestHeadersParsed > _eagerRequestHeadersParsedLimit) { KestrelBadHttpRequestException.Throw(RequestRejectionReason.TooManyHeaders); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs index c8ff2a3c908f..45aae35e77c4 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs @@ -1128,6 +1128,8 @@ private void StartStream() try { + _currentHeadersStream.TotalParsedHeaderSize = _totalParsedHeaderSize; + // This must be initialized before we offload the request or else we may start processing request body frames without it. _currentHeadersStream.InputRemaining = _currentHeadersStream.RequestHeaders.ContentLength; @@ -1410,8 +1412,10 @@ private void OnHeaderCore(HeaderType headerType, int? staticTableIndex, ReadOnly // https://tools.ietf.org/html/rfc7540#section-6.5.2 // "The value is based on the uncompressed size of header fields, including the length of the name and value in octets plus an overhead of 32 octets for each header field."; - _totalParsedHeaderSize += HeaderField.RfcOverhead + name.Length + value.Length; - if (_totalParsedHeaderSize > _context.ServiceContext.ServerOptions.Limits.MaxRequestHeadersTotalSize) + // We don't include the 32 byte overhead hear so we can accept a little more than the advertised limit. + _totalParsedHeaderSize += name.Length + value.Length; + // Allow a 2x grace before aborting the connection. We'll check the size limit again later where we can send a 431. + if (_totalParsedHeaderSize > _context.ServiceContext.ServerOptions.Limits.MaxRequestHeadersTotalSize * 2) { throw new Http2ConnectionErrorException(CoreStrings.BadRequest_HeadersExceedMaxTotalSize, Http2ErrorCode.PROTOCOL_ERROR); } diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs index 6df8039ae77e..9e9ff968a3a7 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs @@ -25,6 +25,8 @@ internal abstract partial class Http2Stream : HttpProtocol, IThreadPoolWorkItem, private bool _decrementCalled; + public int TotalParsedHeaderSize { get; set; } + public Pipe RequestBodyPipe { get; private set; } = default!; internal long DrainExpirationTicks { get; set; } @@ -41,6 +43,9 @@ public void Initialize(Http2StreamContext context) InputRemaining = null; RequestBodyStarted = false; DrainExpirationTicks = 0; + TotalParsedHeaderSize = 0; + // Allow up to 2x during parsing, enforce the hard limit after when we can preserve the connection. + _eagerRequestHeadersParsedLimit = ServerOptions.Limits.MaxRequestHeaderCount * 2; _context = context; @@ -198,6 +203,18 @@ protected override bool TryParseRequest(ReadResult result, out bool endConnectio // do the reading from a pipeline, nor do we use endConnection to report connection-level errors. endConnection = !TryValidatePseudoHeaders(); + // 431 if the headers are too large + if (TotalParsedHeaderSize > ServerOptions.Limits.MaxRequestHeadersTotalSize) + { + KestrelBadHttpRequestException.Throw(RequestRejectionReason.HeadersExceedMaxTotalSize); + } + + // 431 if we received too many headers + if (RequestHeadersParsed > ServerOptions.Limits.MaxRequestHeaderCount) + { + KestrelBadHttpRequestException.Throw(RequestRejectionReason.TooManyHeaders); + } + // Suppress pseudo headers from the public headers collection. HttpRequestHeaders.ClearPseudoRequestHeaders(); diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs index ea9a8ce96e3d..aaf4cd8e645f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs @@ -96,6 +96,8 @@ public void Initialize(Http3StreamContext context) _requestHeaderParsingState = default; _parsedPseudoHeaderFields = default; _totalParsedHeaderSize = 0; + // Allow up to 2x during parsing, enforce the hard limit after when we can preserve the connection. + _eagerRequestHeadersParsedLimit = ServerOptions.Limits.MaxRequestHeaderCount * 2; _isMethodConnect = false; _completionState = default; StreamTimeoutTicks = 0; @@ -275,10 +277,12 @@ private void AppendHeader(ReadOnlySpan name, ReadOnlySpan value) private void OnHeaderCore(HeaderType headerType, int? staticTableIndex, ReadOnlySpan name, ReadOnlySpan value) { - // https://tools.ietf.org/html/rfc7540#section-6.5.2 + // https://httpwg.org/specs/rfc9114.html#rfc.section.4.2.2 // "The value is based on the uncompressed size of header fields, including the length of the name and value in octets plus an overhead of 32 octets for each header field."; - _totalParsedHeaderSize += HeaderField.RfcOverhead + name.Length + value.Length; - if (_totalParsedHeaderSize > _context.ServiceContext.ServerOptions.Limits.MaxRequestHeadersTotalSize) + // We don't include the 32 byte overhead hear so we can accept a little more than the advertised limit. + _totalParsedHeaderSize += name.Length + value.Length; + // Allow a 2x grace before aborting the stream. We'll check the size limit again later where we can send a 431. + if (_totalParsedHeaderSize > ServerOptions.Limits.MaxRequestHeadersTotalSize * 2) { throw new Http3StreamErrorException(CoreStrings.BadRequest_HeadersExceedMaxTotalSize, Http3ErrorCode.RequestRejected); } @@ -939,6 +943,18 @@ protected override bool TryParseRequest(ReadResult result, out bool endConnectio { endConnection = !TryValidatePseudoHeaders(); + // 431 if the headers are too large + if (_totalParsedHeaderSize > ServerOptions.Limits.MaxRequestHeadersTotalSize) + { + KestrelBadHttpRequestException.Throw(RequestRejectionReason.HeadersExceedMaxTotalSize); + } + + // 431 if we received too many headers + if (RequestHeadersParsed > ServerOptions.Limits.MaxRequestHeaderCount) + { + KestrelBadHttpRequestException.Throw(RequestRejectionReason.TooManyHeaders); + } + // Suppress pseudo headers from the public headers collection. HttpRequestHeaders.ClearPseudoRequestHeaders(); diff --git a/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTests.cs b/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTests.cs index 45092dd97e8a..34df8cd8842d 100644 --- a/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTests.cs +++ b/src/Servers/Kestrel/Core/test/Http1/Http1ConnectionTests.cs @@ -88,6 +88,7 @@ public async Task TakeMessageHeadersThrowsWhenHeadersExceedCountLimit() { const string headerLines = "Header-1: value1\r\nHeader-2: value2\r\n"; _serviceContext.ServerOptions.Limits.MaxRequestHeaderCount = 1; + _http1Connection.Initialize(_http1ConnectionContext); await _application.Output.WriteAsync(Encoding.ASCII.GetBytes($"{headerLines}\r\n")); var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; diff --git a/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs b/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs index 079ce4e2ec43..8ebc36065b57 100644 --- a/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs +++ b/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs @@ -650,7 +650,7 @@ internal async Task WaitForStreamErrorAsync(Http3ErrorCode protocolError, Action internal class Http3RequestHeaderHandler { - public readonly byte[] HeaderEncodingBuffer = new byte[64 * 1024]; + public readonly byte[] HeaderEncodingBuffer = new byte[96 * 1024]; public readonly QPackDecoder QpackDecoder = new QPackDecoder(8192); public readonly Dictionary DecodedHeaders = new Dictionary(StringComparer.OrdinalIgnoreCase); } @@ -699,9 +699,8 @@ public async Task SendHeadersAsync(Http3HeadersEnumerator headers, bool endStrea var done = QPackHeaderWriter.BeginEncodeHeaders(headers, buffer.Span, ref headersTotalSize, out var length); if (!done) { - throw new InvalidOperationException("Headers not sent."); + throw new InvalidOperationException("The headers are too large."); } - await SendFrameAsync(Http3FrameType.Headers, buffer.Slice(0, length), endStream); } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs index e2d71746cb82..728a11dea34f 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs @@ -2724,7 +2724,7 @@ await WaitForConnectionErrorAsync( [Fact] public Task HEADERS_Received_HeaderBlockOverLimit_ConnectionError() { - // > 32kb + // > 32kb * 2 to exceed graceful handling limit var headers = new[] { new KeyValuePair(InternalHeaderNames.Method, "GET"), @@ -2738,6 +2738,14 @@ public Task HEADERS_Received_HeaderBlockOverLimit_ConnectionError() new KeyValuePair("f", _4kHeaderValue), new KeyValuePair("g", _4kHeaderValue), new KeyValuePair("h", _4kHeaderValue), + new KeyValuePair("i", _4kHeaderValue), + new KeyValuePair("j", _4kHeaderValue), + new KeyValuePair("k", _4kHeaderValue), + new KeyValuePair("l", _4kHeaderValue), + new KeyValuePair("m", _4kHeaderValue), + new KeyValuePair("n", _4kHeaderValue), + new KeyValuePair("o", _4kHeaderValue), + new KeyValuePair("p", _4kHeaderValue), }; return HEADERS_Received_InvalidHeaderFields_ConnectionError(headers, CoreStrings.BadRequest_HeadersExceedMaxTotalSize); @@ -2746,7 +2754,7 @@ public Task HEADERS_Received_HeaderBlockOverLimit_ConnectionError() [Fact] public Task HEADERS_Received_TooManyHeaders_ConnectionError() { - // > MaxRequestHeaderCount (100) + // > MaxRequestHeaderCount (100) * 2 to exceed graceful handling limit var headers = new List>(); headers.AddRange(new[] { @@ -2754,7 +2762,7 @@ public Task HEADERS_Received_TooManyHeaders_ConnectionError() new KeyValuePair(InternalHeaderNames.Path, "/"), new KeyValuePair(InternalHeaderNames.Scheme, "http"), }); - for (var i = 0; i < 100; i++) + for (var i = 0; i < 200; i++) { headers.Add(new KeyValuePair(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture))); } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs index b5e37940abea..4ec15cf429f2 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2StreamTests.cs @@ -4,6 +4,7 @@ using System; using System.Buffers; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; @@ -797,6 +798,77 @@ public async Task HEADERS_Received_MaxRequestLineSize_Reset() await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false); } + [Fact] + public async Task HEADERS_Received_MaxRequestHeadersTotalSize_431() + { + // > 32kb + var headers = new[] + { + new KeyValuePair(InternalHeaderNames.Method, "GET"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + new KeyValuePair("a", _4kHeaderValue), + new KeyValuePair("b", _4kHeaderValue), + new KeyValuePair("c", _4kHeaderValue), + new KeyValuePair("d", _4kHeaderValue), + new KeyValuePair("e", _4kHeaderValue), + new KeyValuePair("f", _4kHeaderValue), + new KeyValuePair("g", _4kHeaderValue), + new KeyValuePair("h", _4kHeaderValue), + }; + await InitializeConnectionAsync(_notImplementedApp); + + await StartStreamAsync(1, headers, endStream: true); + + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 40, + withFlags: (byte)(Http2HeadersFrameFlags.END_HEADERS | Http2HeadersFrameFlags.END_STREAM), + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false); + + _hpackDecoder.Decode(headersFrame.PayloadSequence, endHeaders: true, handler: this); + + Assert.Equal(3, _decodedHeaders.Count); + Assert.Contains("date", _decodedHeaders.Keys, StringComparer.OrdinalIgnoreCase); + Assert.Equal("431", _decodedHeaders[InternalHeaderNames.Status]); + Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); + } + + [Fact] + public async Task HEADERS_Received_MaxRequestHeaderCount_431() + { + // > 100 headers + var headers = new List>() + { + new KeyValuePair(InternalHeaderNames.Method, "GET"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + }; + for (var i = 0; i < 101; i++) + { + var text = i.ToString(CultureInfo.InvariantCulture); + headers.Add(new KeyValuePair(text, text)); + } + await InitializeConnectionAsync(_notImplementedApp); + + await StartStreamAsync(1, headers, endStream: true); + + var headersFrame = await ExpectAsync(Http2FrameType.HEADERS, + withLength: 40, + withFlags: (byte)(Http2HeadersFrameFlags.END_HEADERS | Http2HeadersFrameFlags.END_STREAM), + withStreamId: 1); + + await StopConnectionAsync(expectedLastStreamId: 1, ignoreNonGoAwayFrames: false); + + _hpackDecoder.Decode(headersFrame.PayloadSequence, endHeaders: true, handler: this); + + Assert.Equal(3, _decodedHeaders.Count); + Assert.Contains("date", _decodedHeaders.Keys, StringComparer.OrdinalIgnoreCase); + Assert.Equal("431", _decodedHeaders[InternalHeaderNames.Status]); + Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); + } + [Fact] public async Task ContentLength_Received_SingleDataFrame_Verified() { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs index fbcf2dba861f..727c1ff62827 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2TestBase.cs @@ -134,6 +134,7 @@ protected static IEnumerable> ReadRateRequestHeader protected readonly TaskCompletionSource _closedStateReached = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); protected readonly RequestDelegate _noopApplication; + protected readonly RequestDelegate _notImplementedApp; protected readonly RequestDelegate _readHeadersApplication; protected readonly RequestDelegate _readTrailersApplication; protected readonly RequestDelegate _bufferingApplication; @@ -176,6 +177,7 @@ public Http2TestBase() }); _noopApplication = context => Task.CompletedTask; + _notImplementedApp = _ => throw new NotImplementedException(); _readHeadersApplication = context => { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs index 884d3d9a4f4a..79d0668d135d 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs @@ -2300,7 +2300,7 @@ await requestStream.WaitForStreamErrorAsync( } [Fact] - public Task HEADERS_Received_HeaderBlockOverLimit_ConnectionError() + public async Task HEADERS_Received_HeaderBlockOverLimit_431() { // > 32kb var headers = new[] @@ -2318,11 +2318,50 @@ public Task HEADERS_Received_HeaderBlockOverLimit_ConnectionError() new KeyValuePair("h", _4kHeaderValue), }; + var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_notImplementedApp, headers, endStream: true); + + var receivedHeaders = await requestStream.ExpectHeadersAsync(); + + await requestStream.ExpectReceiveEndOfStream(); + + Assert.Equal(3, receivedHeaders.Count); + Assert.Contains("date", receivedHeaders.Keys, StringComparer.OrdinalIgnoreCase); + Assert.Equal("431", receivedHeaders[InternalHeaderNames.Status]); + Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); + } + + [Fact] + public Task HEADERS_Received_HeaderBlockOverLimitx2_ConnectionError() + { + // > 32kb * 2 to exceed graceful handling limit + var headers = new[] + { + new KeyValuePair(InternalHeaderNames.Method, "GET"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + new KeyValuePair("a", _4kHeaderValue), + new KeyValuePair("b", _4kHeaderValue), + new KeyValuePair("c", _4kHeaderValue), + new KeyValuePair("d", _4kHeaderValue), + new KeyValuePair("e", _4kHeaderValue), + new KeyValuePair("f", _4kHeaderValue), + new KeyValuePair("g", _4kHeaderValue), + new KeyValuePair("h", _4kHeaderValue), + new KeyValuePair("i", _4kHeaderValue), + new KeyValuePair("j", _4kHeaderValue), + new KeyValuePair("k", _4kHeaderValue), + new KeyValuePair("l", _4kHeaderValue), + new KeyValuePair("m", _4kHeaderValue), + new KeyValuePair("n", _4kHeaderValue), + new KeyValuePair("o", _4kHeaderValue), + new KeyValuePair("p", _4kHeaderValue), + }; + return HEADERS_Received_InvalidHeaderFields_StreamError(headers, CoreStrings.BadRequest_HeadersExceedMaxTotalSize, Http3ErrorCode.RequestRejected); } [Fact] - public Task HEADERS_Received_TooManyHeaders_ConnectionError() + public async Task HEADERS_Received_TooManyHeaders_431() { // > MaxRequestHeaderCount (100) var headers = new List>(); @@ -2337,6 +2376,34 @@ public Task HEADERS_Received_TooManyHeaders_ConnectionError() headers.Add(new KeyValuePair(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture))); } + var requestStream = await Http3Api.InitializeConnectionAndStreamsAsync(_notImplementedApp, headers, endStream: true); + + var receivedHeaders = await requestStream.ExpectHeadersAsync(); + + await requestStream.ExpectReceiveEndOfStream(); + + Assert.Equal(3, receivedHeaders.Count); + Assert.Contains("date", receivedHeaders.Keys, StringComparer.OrdinalIgnoreCase); + Assert.Equal("431", receivedHeaders[InternalHeaderNames.Status]); + Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); + } + + [Fact] + public Task HEADERS_Received_TooManyHeadersx2_ConnectionError() + { + // > MaxRequestHeaderCount (100) * 2 to exceed graceful handling limit + var headers = new List>(); + headers.AddRange(new[] + { + new KeyValuePair(InternalHeaderNames.Method, "GET"), + new KeyValuePair(InternalHeaderNames.Path, "/"), + new KeyValuePair(InternalHeaderNames.Scheme, "http"), + }); + for (var i = 0; i < 200; i++) + { + headers.Add(new KeyValuePair(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture))); + } + return HEADERS_Received_InvalidHeaderFields_StreamError(headers, CoreStrings.BadRequest_TooManyHeaders); } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs index dc28eafb46d9..b5d0f612afd5 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3TestBase.cs @@ -49,6 +49,7 @@ public abstract class Http3TestBase : TestApplicationErrorLoggerLoggedTest, IDis internal readonly Mock _mockTimeoutHandler = new Mock(); protected readonly RequestDelegate _noopApplication; + protected readonly RequestDelegate _notImplementedApp; protected readonly RequestDelegate _echoApplication; protected readonly RequestDelegate _readRateApplication; protected readonly RequestDelegate _echoMethod; @@ -79,6 +80,7 @@ protected static IEnumerable> ReadRateRequestHeader public Http3TestBase() { _noopApplication = context => Task.CompletedTask; + _notImplementedApp = _ => throw new NotImplementedException(); _echoApplication = async context => { diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpClientHttp2InteropTests.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpClientHttp2InteropTests.cs index 086a96b16356..6ab377f47815 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpClientHttp2InteropTests.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/HttpClientHttp2InteropTests.cs @@ -1369,10 +1369,10 @@ public async Task Settings_MaxHeaderListSize_Server(string scheme) { request.Headers.Add("header" + i, oneKbString + i); } - // Kestrel closes the connection rather than sending the recommended 431 response. https://github.com/dotnet/aspnetcore/issues/17861 - await Assert.ThrowsAsync(() => client.SendAsync(request)).DefaultTimeout(); - + var response = await client.SendAsync(request).DefaultTimeout(); await host.StopAsync().DefaultTimeout(); + + Assert.Equal(HttpStatusCode.RequestHeaderFieldsTooLarge, response.StatusCode); } [Theory] From cf5bfa197fdaba04576bedb8352707321804b6ac Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Thu, 3 Nov 2022 20:12:19 -0700 Subject: [PATCH 09/35] Catch JSDisconnectedException during disposal (#44800) (#44806) --- src/Components/Web/src/Routing/NavigationLock.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Components/Web/src/Routing/NavigationLock.cs b/src/Components/Web/src/Routing/NavigationLock.cs index e8b5566531de..622ab43a1865 100644 --- a/src/Components/Web/src/Routing/NavigationLock.cs +++ b/src/Components/Web/src/Routing/NavigationLock.cs @@ -107,7 +107,14 @@ async ValueTask IAsyncDisposable.DisposeAsync() if (_confirmExternalNavigation) { - await JSRuntime.InvokeVoidAsync(NavigationLockInterop.DisableNavigationPrompt, _id); + try + { + await JSRuntime.InvokeVoidAsync(NavigationLockInterop.DisableNavigationPrompt, _id); + } + catch (JSDisconnectedException) + { + // If the browser is gone, we don't need it to clean up any browser-side state + } } } } From b90c9be26bbc314acbaa95d39fa7123d1d630f3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 20:12:48 -0700 Subject: [PATCH 10/35] Produce arch-specific ANCM redist packages (#44848) Co-authored-by: Will Godbe --- .../ANCMIISExpressV2/AncmIISExpressV2.nuspec | 4 ++-- .../Windows/AspNetCoreModule-Setup/ANCMV2/AncmV2.nuspec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.nuspec b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.nuspec index deafcb88f55a..fada190bc386 100644 --- a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.nuspec +++ b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.nuspec @@ -1,9 +1,9 @@ - VS.Redist.Common.AspNetCore.AspNetCoreModuleV2IISExpress.$MAJOR$.$MINOR$ + VS.Redist.Common.AspNetCore.AspNetCoreModuleV2IISExpress.$ARCH$.$MAJOR$.$MINOR$ 1.0.0 - VS.Redist.Common.AspNetCore.AspNetCoreModuleV2IISExpress.$MAJOR$.$MINOR$ + VS.Redist.Common.AspNetCore.AspNetCoreModuleV2IISExpress.$ARCH$.$MAJOR$.$MINOR$ Microsoft Microsoft $PackageLicenseExpression$ diff --git a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/AncmV2.nuspec b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/AncmV2.nuspec index 5eedd79158ac..beff88e44574 100644 --- a/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/AncmV2.nuspec +++ b/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/AncmV2.nuspec @@ -1,9 +1,9 @@ - VS.Redist.Common.AspNetCore.AspNetCoreModuleV2.$MAJOR$.$MINOR$ + VS.Redist.Common.AspNetCore.AspNetCoreModuleV2.$ARCH$.$MAJOR$.$MINOR$ 1.0.0 - VS.Redist.Common.AspNetCore.AspNetCoreModuleV2.$MAJOR$.$MINOR$ + VS.Redist.Common.AspNetCore.AspNetCoreModuleV2.$ARCH$.$MAJOR$.$MINOR$ Microsoft Microsoft $PackageLicenseExpression$ From 16a875a03f088a04343e25d34837c520c5bdb795 Mon Sep 17 00:00:00 2001 From: Sapana-Khemkar <94051076+Sapana-Khemkar@users.noreply.github.com> Date: Fri, 4 Nov 2022 08:44:25 +0530 Subject: [PATCH 11/35] add ppc64le arch to crossgen2 not available list (#44583) --- .../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c0627880378c..bf90848a34bd 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -42,8 +42,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder);.r2rmap - - false + + false true From 76c143efd997e94a5e37b2a37d17f47caceee393 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Nov 2022 10:35:20 -0800 Subject: [PATCH 12/35] [release/7.0] Make Kestrel prefer on-disk cert for macOS bind. (#44856) * Make Kestrel prefer on-disk cert for macOS bind. * Clarify Intersect behavior in comment. Co-authored-by: Aditya Mandaleeka --- .../Kestrel/Core/src/KestrelServerOptions.cs | 2 +- .../CertificateGeneration/CertificateManager.cs | 4 ++-- .../MacOSCertificateManager.cs | 17 ++++++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs index 3dbbdee155d6..ba5c6151b4eb 100644 --- a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs +++ b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs @@ -290,7 +290,7 @@ private void EnsureDefaultCert() var logger = ApplicationServices!.GetRequiredService>(); try { - DefaultCertificate = CertificateManager.Instance.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true) + DefaultCertificate = CertificateManager.Instance.ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: false) .FirstOrDefault(); if (DefaultCertificate != null) diff --git a/src/Shared/CertificateGeneration/CertificateManager.cs b/src/Shared/CertificateGeneration/CertificateManager.cs index c34d88f8c00c..00478e6284ef 100644 --- a/src/Shared/CertificateGeneration/CertificateManager.cs +++ b/src/Shared/CertificateGeneration/CertificateManager.cs @@ -78,7 +78,7 @@ public IList ListCertificates( { using var store = new X509Store(storeName, location); store.Open(OpenFlags.ReadOnly); - PopulateCertificatesFromStore(store, certificates); + PopulateCertificatesFromStore(store, certificates, requireExportable); IEnumerable matchingCertificates = certificates; matchingCertificates = matchingCertificates .Where(c => HasOid(c, AspNetHttpsOid)); @@ -161,7 +161,7 @@ bool IsValidCertificate(X509Certificate2 certificate, DateTimeOffset currentDate GetCertificateVersion(certificate) >= AspNetHttpsCertificateVersion; } - protected virtual void PopulateCertificatesFromStore(X509Store store, List certificates) + protected virtual void PopulateCertificatesFromStore(X509Store store, List certificates, bool requireExportable) { certificates.AddRange(store.Certificates.OfType()); } diff --git a/src/Shared/CertificateGeneration/MacOSCertificateManager.cs b/src/Shared/CertificateGeneration/MacOSCertificateManager.cs index 343a93f00bcd..30237e445f61 100644 --- a/src/Shared/CertificateGeneration/MacOSCertificateManager.cs +++ b/src/Shared/CertificateGeneration/MacOSCertificateManager.cs @@ -373,14 +373,14 @@ protected override IList GetCertificatesToRemove(StoreName sto return ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: false); } - protected override void PopulateCertificatesFromStore(X509Store store, List certificates) + protected override void PopulateCertificatesFromStore(X509Store store, List certificates, bool requireExportable) { if (store.Name! == StoreName.My.ToString() && store.Location == StoreLocation.CurrentUser && Directory.Exists(MacOSUserHttpsCertificateLocation)) { var certsFromDisk = GetCertsFromDisk(); var certsFromStore = new List(); - base.PopulateCertificatesFromStore(store, certsFromStore); + base.PopulateCertificatesFromStore(store, certsFromStore, requireExportable); // Certs created by pre-.NET 7. var onlyOnKeychain = certsFromStore.Except(certsFromDisk, ThumbprintComparer.Instance); @@ -388,10 +388,13 @@ protected override void PopulateCertificatesFromStore(X509Store store, List Date: Tue, 8 Nov 2022 15:09:38 -0800 Subject: [PATCH 13/35] [release/7.0] Remove experimental and downlevel feeds (#44879) - [release/7.0] Remove experimental and downlevel feeds - Change additional versions - bump SiteExtension.3.1 and SiteExtension.6.0 package versions - downgrade Microsoft.Extensions.DiagnosticAdapter to avoid needing the dotnet5 feed --- NuGet.config | 9 +++------ eng/Versions.props | 11 ++++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/NuGet.config b/NuGet.config index 4c9c7a31cd75..7cb10daf21b9 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,14 +14,11 @@ - - - - - - + + + diff --git a/eng/Versions.props b/eng/Versions.props index a9f6b4797ecd..030499652c19 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -161,8 +161,9 @@ true 4.4.0-3.22452.8 - - 5.0.0-preview.4.20180.4 + + + 5.0.0-preview.3.20215.2 15.9.3032 @@ -228,16 +229,16 @@ 5.0.0 5.0.0-alpha.20560.6 5.0.0 - + 2.1.1 2.2.0 - 3.1.28-servicing-22364-2 + 3.1.30-servicing-22476-24 $(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version) 5.0.17-servicing-22215-7 $(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version) - 6.0.8-servicing-22363-16 + 6.0.10-servicing-22476-17 $(MicrosoftAspNetCoreAzureAppServicesSiteExtension60Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension60Version) From 2ebaa4c3f08dc38969dfcd98b8d6f7afb3772d11 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Tue, 8 Nov 2022 18:43:54 -0800 Subject: [PATCH 14/35] [release/7.0] Update baselines, et cetera - update baselines to 7.0.0 release - start from - picks up all dropped and added packages in 7.0.0 - enable baseline validation - update the .NET SDK to the GA version - update site extension versions - correct a typo in `$(DotNetPrivateAssetRootUrl)` value --- eng/Baseline.Designer.props | 1028 +++++++++++++++++------------------ eng/Baseline.xml | 214 ++++---- eng/Versions.props | 8 +- global.json | 4 +- 4 files changed, 621 insertions(+), 633 deletions(-) diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index bd11897b76a6..ec629dd0f009 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,486 +2,497 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 6.0.0 + 7.0.0 - - - 6.0.0 + + + 7.0.0 - - - 6.0.0 + + + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 - - - - - - - - - - - + 7.0.0 + + + + + + + + + + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - 6.0.0 - - - - - - - - 6.0.0 - - - - - - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - + + + + - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - - - - + + + + - - - - + + + + - - - + + + - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 + + + + + + + + 7.0.0 - - - + + - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - - - - - - + + + + + + - 6.0.0 + 7.0.0 - - - - - - + + + + + + - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - - - - - + + + + + + + - 6.0.0 + 7.0.0 - - - + + + + - 6.0.0 + 7.0.0 - - + + - + - - - + + + - + - + - - + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + - - + + - + - 6.0.0 - - - - - - - - + 7.0.0 + + + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - - - + + + - - - + + + - - + + - 6.0.0 + 7.0.0 - - + + - - + + - + - 6.0.0 + 7.0.0 + + + + + + + 7.0.0 + + + + + + + + + 0.3.0 - - + + + - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - - - - + + + + - - - - + + + + - - - + + + - - - + + + - 6.0.0 + 7.0.0 - - - + + + - - + + - - + + - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - - - + + + - 6.0.0 + 7.0.0 - + - + @@ -491,501 +502,480 @@ - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - - + + - - - 6.0.0 - - - - - - 6.0.0 + 7.0.0 - + - + - 6.0.0 + 7.0.0 + + + + + + + + + 7.0.0 - - - - + + - 6.0.0 + 7.0.0 - - - 6.0.0 - - - - 6.0.0 - - - - - - - - 6.0.0 + 7.0.0 - - - + + + - - - + + + - - + + - 6.0.0 - - - - - - - - - - - - - - + 7.0.0 + + + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - 6.0.0 + 7.0.0 - - - + + + - + - - - + + + - - - + + + - 6.0.0 + 7.0.0 - - + + - - + + - + - 6.0.0 + 7.0.0 - - + + - - + + - + - 6.0.0 + 7.0.0 - - + + - - + + - + - 6.0.0 + 7.0.0 - - - - - - - + + + + + + + - 6.0.0 + 7.0.0 - + - + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - - + + - 6.0.0 - - - - - - - 6.0.0 + 7.0.0 - - - - + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - 6.0.0 + + + 7.0.0 - - - 6.0.0 + + + 7.0.0 - - - 6.0.0 + + + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - - + + + + - - - - + + + + - - - + + + - 6.0.0 + 7.0.0 - - - + + + + - - - + + + + - - + + + - 6.0.0 + 7.0.0 - - - + + + - - - + + + - - + + - 6.0.0 + 7.0.0 - - - - - + + + + + - - - - - + + + + + - - - - + + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - - + + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + - + - 6.0.0 + 7.0.0 - - + + - 6.0.0 + 7.0.0 - - - - + + + + - - - - + + + + - - - + + + - 6.0.0 + 7.0.0 - - - - + + + + - - - - + + + + - - - + + + - 6.0.0 + 7.0.0 - - - - - + + + + + - - - - - + + + + + - - - - + + + + - 6.0.0 + 7.0.0 - 6.0.0 - - - - - - - + 7.0.0 + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - - - + + + + - - - + + + - - - + + + - 6.0.0 + 7.0.0 - 6.0.0 + 7.0.0 - - + + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index afdf976591a5..fb5ba67dbbb9 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -1,114 +1,112 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Versions.props b/eng/Versions.props index 5fe031d39f5e..519995cf6a67 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -9,7 +9,7 @@ 7 0 1 - false + true @@ -232,13 +232,13 @@ 2.1.1 2.2.0 - 3.1.30-servicing-22476-24 + 3.1.31-servicing-22514-9 $(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version) 5.0.17-servicing-22215-7 $(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version) - 6.0.10-servicing-22476-17 + 6.0.11-servicing-22523-4 $(MicrosoftAspNetCoreAzureAppServicesSiteExtension60Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension60Version) @@ -301,6 +301,6 @@ https://dotnetbuilds.azureedge.net/public/ - https://dotnetbuilds.azureedge.net/internal/ + https://dotnetbuilds.azureedge.net/internal/ diff --git a/global.json b/global.json index 6aacb21feb2e..72e045192a0a 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "7.0.100-rtm.22478.12" + "version": "7.0.100" }, "tools": { - "dotnet": "7.0.100-rtm.22478.12", + "dotnet": "7.0.100", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" From 3e22a24c882e0c772528345af385715f53ebc5ff Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 9 Nov 2022 11:55:14 -0800 Subject: [PATCH 15/35] Use arcade download task and also check dotnetcli --- eng/Versions.props | 6 - eng/tools/RepoTasks/DownloadFile.cs | 148 ------------------ eng/tools/RepoTasks/RepoTasks.tasks | 1 - .../Microsoft.AspNetCore.App.Runtime.csproj | 22 ++- 4 files changed, 15 insertions(+), 162 deletions(-) delete mode 100644 eng/tools/RepoTasks/DownloadFile.cs diff --git a/eng/Versions.props b/eng/Versions.props index 519995cf6a67..033c88ceac98 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -297,10 +297,4 @@ 1.10.93 1.2.3 - - - - https://dotnetbuilds.azureedge.net/public/ - https://dotnetbuilds.azureedge.net/internal/ - diff --git a/eng/tools/RepoTasks/DownloadFile.cs b/eng/tools/RepoTasks/DownloadFile.cs deleted file mode 100644 index 7174fdae60f6..000000000000 --- a/eng/tools/RepoTasks/DownloadFile.cs +++ /dev/null @@ -1,148 +0,0 @@ -// 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.IO; -using System.Net; -using System.Net.Http; -using System.Threading.Tasks; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace RepoTasks; - -public class DownloadFile : Microsoft.Build.Utilities.Task -{ - [Required] - public string Uri { get; set; } - - /// - /// If this field is set and the task fail to download the file from `Uri`, with a NotFound - /// status, it will try to download the file from `PrivateUri`. - /// - public string PrivateUri { get; set; } - - /// - /// Suffix for the private URI in base64 form (for SAS compatibility) - /// - public string PrivateUriSuffix { get; set; } - - public int MaxRetries { get; set; } = 5; - - [Required] - public string DestinationPath { get; set; } - - public bool Overwrite { get; set; } - - public override bool Execute() - { - return ExecuteAsync().GetAwaiter().GetResult(); - } - - private async System.Threading.Tasks.Task ExecuteAsync() - { - string destinationDir = Path.GetDirectoryName(DestinationPath); - if (!Directory.Exists(destinationDir)) - { - Directory.CreateDirectory(destinationDir); - } - - if (File.Exists(DestinationPath) && !Overwrite) - { - return true; - } - - const string FileUriProtocol = "file://"; - - if (Uri.StartsWith(FileUriProtocol, StringComparison.Ordinal)) - { - var filePath = Uri.Substring(FileUriProtocol.Length); - Log.LogMessage($"Copying '{filePath}' to '{DestinationPath}'"); - File.Copy(filePath, DestinationPath); - return true; - } - - List errorMessages = new List(); - bool? downloadStatus = await DownloadWithRetriesAsync(Uri, DestinationPath, errorMessages); - - if (downloadStatus == false && !string.IsNullOrEmpty(PrivateUri)) - { - string uriSuffix = ""; - if (!string.IsNullOrEmpty(PrivateUriSuffix)) - { - var uriSuffixBytes = System.Convert.FromBase64String(PrivateUriSuffix); - uriSuffix = System.Text.Encoding.UTF8.GetString(uriSuffixBytes); - } - downloadStatus = await DownloadWithRetriesAsync($"{PrivateUri}{uriSuffix}", DestinationPath, errorMessages); - } - - if (downloadStatus != true) - { - foreach (var error in errorMessages) - { - Log.LogError(error); - } - } - - return downloadStatus == true; - } - - /// - /// Attempt to download file from `source` with retries when response error is different of FileNotFound and Success. - /// - /// URL to the file to be downloaded. - /// Local path where to put the downloaded file. - /// true: Download Succeeded. false: Download failed with 404. null: Download failed but is retriable. - private async Task DownloadWithRetriesAsync(string source, string target, List errorMessages) - { - Random rng = new Random(); - - Log.LogMessage(MessageImportance.High, $"Attempting download '{source}' to '{target}'"); - - using (var httpClient = new HttpClient { Timeout = TimeSpan.FromMinutes(7.5) }) - { - for (int retryNumber = 0; retryNumber < MaxRetries; retryNumber++) - { - try - { - var httpResponse = await httpClient.GetAsync(source); - - Log.LogMessage(MessageImportance.High, $"{source} -> {httpResponse.StatusCode}"); - - // The Azure Storage REST API returns '400 - Bad Request' in some cases - // where the resource is not found on the storage. - // https://docs.microsoft.com/en-us/rest/api/storageservices/common-rest-api-error-codes - if (httpResponse.StatusCode == HttpStatusCode.NotFound || - httpResponse.ReasonPhrase.IndexOf("The requested URI does not represent any resource on the server.", StringComparison.OrdinalIgnoreCase) == 0) - { - errorMessages.Add($"Problems downloading file from '{source}'. Does the resource exist on the storage? {httpResponse.StatusCode} : {httpResponse.ReasonPhrase}"); - return false; - } - - httpResponse.EnsureSuccessStatusCode(); - - using (var outStream = File.Create(target)) - { - await httpResponse.Content.CopyToAsync(outStream); - } - - Log.LogMessage(MessageImportance.High, $"returning true {source} -> {httpResponse.StatusCode}"); - return true; - } - catch (Exception e) - { - Log.LogMessage(MessageImportance.High, $"returning error in {source} "); - errorMessages.Add($"Problems downloading file from '{source}'. {e.Message} {e.StackTrace}"); - File.Delete(target); - } - - await System.Threading.Tasks.Task.Delay(rng.Next(1000, 10000)); - } - } - - Log.LogMessage(MessageImportance.High, $"giving up {source} "); - errorMessages.Add($"Giving up downloading the file from '{source}' after {MaxRetries} retries."); - return null; - } -} diff --git a/eng/tools/RepoTasks/RepoTasks.tasks b/eng/tools/RepoTasks/RepoTasks.tasks index 788558c3fa4c..94db734ffb93 100644 --- a/eng/tools/RepoTasks/RepoTasks.tasks +++ b/eng/tools/RepoTasks/RepoTasks.tasks @@ -10,5 +10,4 @@ - 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 bf90848a34bd..e8d47b02c249 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -32,8 +32,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension) - $(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/$(DotNetRuntimeArchiveFileName) - $(DotNetPrivateAssetRootUrl)Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/$(DotNetRuntimeArchiveFileName) + Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/$(DotNetRuntimeArchiveFileName) $(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName) @@ -502,11 +501,20 @@ This package is an internal implementation of the .NET Core SDK and is not meant ######################################### --> - + + + + + + $(DotnetRuntimeSourceFeedKey) + + + + + From f8c8289ea7fc9c5f5356aaf38789355269a8979f Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 9 Nov 2022 13:45:55 -0800 Subject: [PATCH 16/35] Archive this --- .../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e8d47b02c249..7bcdccc74616 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -513,7 +513,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant + DestinationPath="$(DotNetRuntimeArchive)" /> From 354348c5069594ed5d855230aa97aba0e2c2da74 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 9 Nov 2022 14:16:32 -0800 Subject: [PATCH 17/35] Add the usingtask for DownloadFile --- eng/tools/RepoTasks/RepoTasks.tasks | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/tools/RepoTasks/RepoTasks.tasks b/eng/tools/RepoTasks/RepoTasks.tasks index 94db734ffb93..c5722a9e266d 100644 --- a/eng/tools/RepoTasks/RepoTasks.tasks +++ b/eng/tools/RepoTasks/RepoTasks.tasks @@ -10,4 +10,5 @@ + From 66bba56c4edf65ea3ab8141b5aef2652a3565929 Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 9 Nov 2022 14:40:19 -0800 Subject: [PATCH 18/35] Fix SiteExtension loading on App Service (#44887) --- .../src/Microsoft.Web.Xdt.Extensions.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SiteExtensions/Microsoft.Web.Xdt.Extensions/src/Microsoft.Web.Xdt.Extensions.csproj b/src/SiteExtensions/Microsoft.Web.Xdt.Extensions/src/Microsoft.Web.Xdt.Extensions.csproj index 7985b489fad6..b8ecbcdcadbb 100644 --- a/src/SiteExtensions/Microsoft.Web.Xdt.Extensions/src/Microsoft.Web.Xdt.Extensions.csproj +++ b/src/SiteExtensions/Microsoft.Web.Xdt.Extensions/src/Microsoft.Web.Xdt.Extensions.csproj @@ -10,7 +10,8 @@ - + + From ada3d82e5d8c8653bbc2b11cad5da4f3ac495dd1 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Wed, 9 Nov 2022 14:55:08 -0800 Subject: [PATCH 19/35] Capture more binary logs - get logs for most CI jobs (not Code Check or Helix x64) --- .azure/pipelines/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 9ded1bea4d19..bc52c55d6136 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -417,6 +417,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml $(_BuildArgs) @@ -447,6 +448,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-MacOS_x64.xml $(_BuildArgs) @@ -481,6 +483,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true $(_BuildArgs) $(_InternalRuntimeDownloadArgs) @@ -525,6 +528,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_arm.xml $(_BuildArgs) @@ -558,6 +562,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true $(_BuildArgs) $(_InternalRuntimeDownloadArgs) @@ -598,6 +603,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml $(_BuildArgs) @@ -633,6 +639,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml $(_BuildArgs) @@ -667,6 +674,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml $(_BuildArgs) From 2dea6cd6be3127d514e7ebf788c8af959b6b6cf5 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Wed, 9 Nov 2022 15:24:29 -0800 Subject: [PATCH 20/35] Use Arcade's `DownloadFile` in Windows hosting bundle - was still trying to use our version --- .../WindowsHostingBundle/Product.targets | 64 +++++++++++++------ 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/src/Installers/Windows/WindowsHostingBundle/Product.targets b/src/Installers/Windows/WindowsHostingBundle/Product.targets index dab41417731c..fcf92fa1a106 100644 --- a/src/Installers/Windows/WindowsHostingBundle/Product.targets +++ b/src/Installers/Windows/WindowsHostingBundle/Product.targets @@ -26,33 +26,57 @@ + - https://dotnetcli.azureedge.net/dotnet/ - $(DotNetAssetRootUrl)/ - https://dotnetclimsrc.azureedge.net/dotnet/ - $(DotNetPrivateAssetRootUrl)/ + Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe + Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe + Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe - + + + - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe - - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe - - - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe - + + + + $(DotnetRuntimeSourceFeedKey) + - + + + + + + + + $(DotnetRuntimeSourceFeedKey) + + + + + + + + + + + $(DotnetRuntimeSourceFeedKey) + + - + From 8599521bacf55d7cfa7d1a1e1cd71c2745c20d9e Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Wed, 9 Nov 2022 17:10:20 -0800 Subject: [PATCH 21/35] !fixups! - don't try internal download location in public builds - use two targets to make Product.targets more readable --- .../Microsoft.AspNetCore.App.Runtime.csproj | 3 +- .../WindowsHostingBundle/Product.targets | 70 ++++++++----------- 2 files changed, 31 insertions(+), 42 deletions(-) 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 7bcdccc74616..4ad7d58e60bb 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -506,7 +506,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant - + $(DotnetRuntimeSourceFeedKey) diff --git a/src/Installers/Windows/WindowsHostingBundle/Product.targets b/src/Installers/Windows/WindowsHostingBundle/Product.targets index fcf92fa1a106..2fe40ebe38a6 100644 --- a/src/Installers/Windows/WindowsHostingBundle/Product.targets +++ b/src/Installers/Windows/WindowsHostingBundle/Product.targets @@ -25,61 +25,49 @@ - + + - - Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe - Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe - Runtime/$(MicrosoftNETCoreBrowserDebugHostTransportVersion)/dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe - dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe - - - - - - - - - - $(DotnetRuntimeSourceFeedKey) - - - - - - - - - - $(DotnetRuntimeSourceFeedKey) - + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x64.exe + + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-x86.exe + + + dotnet-runtime-$(MicrosoftNETCoreAppRuntimeVersion)-win-arm64.exe + - + + + + - - - + + + $(DotnetRuntimeSourceFeedKey) - + DestinationPath="$(DepsPath)%(RemoteAsset.TargetFilename)" /> - + From 7b02f8cab05579341d969f2fdd8204e67af0fac9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 16:30:41 +0000 Subject: [PATCH 22/35] source-build: don't use crossgen when building for mono runtime. (#44977) Co-authored-by: Tom Deseyn --- .azure/pipelines/ci.yml | 8 ++++++++ eng/SourceBuild.props | 1 + 2 files changed, 9 insertions(+) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 4db1d90864a9..df4f5766c36f 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -417,6 +417,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml $(_BuildArgs) @@ -447,6 +448,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-MacOS_x64.xml $(_BuildArgs) @@ -481,6 +483,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true $(_BuildArgs) $(_InternalRuntimeDownloadArgs) @@ -525,6 +528,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_arm.xml $(_BuildArgs) @@ -558,6 +562,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true $(_BuildArgs) $(_InternalRuntimeDownloadArgs) @@ -598,6 +603,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml $(_BuildArgs) @@ -633,6 +639,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml $(_BuildArgs) @@ -667,6 +674,7 @@ stages: --all --no-build-nodejs --no-build-java + --binarylog -p:OnlyPackPlatformSpecificPackages=true -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml $(_BuildArgs) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 32108e1f9f29..3dfbd5efcf5e 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -55,6 +55,7 @@ $(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier) + $(InnerBuildArgs) /p:CrossgenOutput=false From b4e2e8cd56895611231e955efefecc672e538b33 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 14:45:25 -0700 Subject: [PATCH 23/35] Adding nuget --version workaround --- .azure/pipelines/ci.yml | 4 ++-- eng/build.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index bc52c55d6136..4a18bc21bfa5 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -489,13 +489,13 @@ stages: $(_InternalRuntimeDownloadArgs) displayName: Run build.sh - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb $(_BuildArgs) $(_InternalRuntimeDownloadArgs) displayName: Build Debian installers - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm -p:AssetManifestFileName=aspnetcore-Linux_x64.xml $(_BuildArgs) diff --git a/eng/build.sh b/eng/build.sh index a6b6ba99be44..093b04affdd4 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -33,6 +33,7 @@ target_arch='x64' configuration='' runtime_source_feed='' runtime_source_feed_key='' +init_nuget=false if [ "$(uname)" = "Darwin" ]; then target_os_name='osx' @@ -82,6 +83,8 @@ Options: --runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs --runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs + --init-nuget Run nuget --version. + Description: This build script installs required tools and runs an MSBuild command on this repository This script can be used to invoke various targets, such as targets to produce packages @@ -208,6 +211,9 @@ while [[ $# -gt 0 ]]; do -ci) ci=true ;; + -init-nuget) + init_nuget=true + ;; -binarylog|-bl) binary_log=true ;; @@ -359,6 +365,30 @@ export MSBUILDDEBUGPATH="$log_dir" _tmp_restore=$restore restore=true +if [[ "$init_nuget" == true ]]; then + InitializeBuildTool + + function RunBuildTool { + "$_InitializeBuildTool" "$@" || { + local exit_code=$? + # We should not Write-PipelineTaskError here because that message shows up in the build summary + # The build already logged an error, that's the reason it failed. Producing an error here only adds noise. + echo "Build failed with exit code $exit_code. Check errors above." + if [[ "$ci" == "true" ]]; then + Write-PipelineSetResult -result "Failed" -message "nuget execution failed." + # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error + # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error + ExitWithExitCode 0 + else + ExitWithExitCode $exit_code + fi + } + } + + echo 'Running dotnet nuget --version (issue: https://github.com/NuGet/Home/issues/12159#issuecomment-1278360511)' + RunBuildTool "nuget" "--version" +fi + InitializeToolset restore=$_tmp_restore= From 905fdaeac11abd955419e6f5a1ab0348c7624c98 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 26 Oct 2022 12:59:18 -0700 Subject: [PATCH 24/35] Adding `init-nuget` to Linux ARM64 (#44745) --- .azure/pipelines/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 4a18bc21bfa5..bfb716fa44fb 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -568,7 +568,7 @@ stages: $(_InternalRuntimeDownloadArgs) displayName: Run build.sh - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml $(_BuildArgs) From 33d20adfe2bea07ac1bbf2395b68ec2344e99276 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 21:02:48 +0000 Subject: [PATCH 25/35] [release/7.0] source-build: support building aspnetcore using non-portable runtime packages. (#44978) - source-build: support building aspnetcore using non-portable runtime packages. - Currently source-build performs 'runtime-portable' build that produces 'linux-{arch}' packages that are used when building ASP.NET Core. - With this change, we can use the non-portable packages that are produced by the source-build 'runtime' build, and eliminate the 'runtime-portable' build. - Invert PortableBuild checks. - Revert name change. Co-authored-by: Tom Deseyn --- Directory.Build.props | 2 ++ eng/Common.props | 2 ++ eng/Dependencies.props | 2 ++ eng/tools/GenerateFiles/Directory.Build.targets.in | 9 +++++++++ .../Driver/Wasm.Performance.Driver.csproj | 2 +- .../src/Microsoft.AspNetCore.App.Runtime.csproj | 5 +++-- src/Tools/Directory.Build.targets | 2 +- 7 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 1230281ba953..d79b636c698c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -174,6 +174,8 @@ freebsd-x64 + $(SupportedRuntimeIdentifiers);$(TargetRuntimeIdentifier) + false true diff --git a/eng/Common.props b/eng/Common.props index a9a69bde9f22..3dcca1c6b54d 100644 --- a/eng/Common.props +++ b/eng/Common.props @@ -6,6 +6,8 @@ freebsd x64 $(TargetOsName)-$(TargetArchitecture) + true + $(TargetRuntimeIdentifier) diff --git a/eng/Dependencies.props b/eng/Dependencies.props index c1b35e485328..0d47cc0a111b 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -106,6 +106,7 @@ and are generated based on the last package release. + @@ -121,6 +122,7 @@ and are generated based on the last package release. + diff --git a/eng/tools/GenerateFiles/Directory.Build.targets.in b/eng/tools/GenerateFiles/Directory.Build.targets.in index 3da7ea2b44d3..30e25d4e68a5 100644 --- a/eng/tools/GenerateFiles/Directory.Build.targets.in +++ b/eng/tools/GenerateFiles/Directory.Build.targets.in @@ -56,18 +56,27 @@ ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) + + ${MicrosoftNETCoreAppRuntimeVersion} + $(TargetRuntimeIdentifier) + + false true - linux-x64 + linux-x64 annotations 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 4ad7d58e60bb..3b5d2ae95048 100644 --- a/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -95,7 +95,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant $(Crossgen2ToolFileName).exe - PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier) + PkgMicrosoft_NETCore_App_Runtime_$(RuntimeIdentifier.Replace('.', '_')) $(TargetOsName) linux + $(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-')))) x64 $(BuildArchitecture) - PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName)-$(Crossgen2BuildArchitecture) + PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture) $(AssetTargetFallback);native,Version=0.0 diff --git a/src/Tools/Directory.Build.targets b/src/Tools/Directory.Build.targets index 854f90ab5c20..438ea3da045d 100644 --- a/src/Tools/Directory.Build.targets +++ b/src/Tools/Directory.Build.targets @@ -1,7 +1,7 @@ - win-x64;win-x86 + win-x64;win-x86 false - 7.0.0-beta.22513.4 - 7.0.0-beta.22513.4 + 7.0.0-beta.22558.4 + 7.0.0-beta.22558.4 7.0.0-alpha.1.22505.1 diff --git a/eng/build.sh b/eng/build.sh index 093b04affdd4..a6b6ba99be44 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -33,7 +33,6 @@ target_arch='x64' configuration='' runtime_source_feed='' runtime_source_feed_key='' -init_nuget=false if [ "$(uname)" = "Darwin" ]; then target_os_name='osx' @@ -83,8 +82,6 @@ Options: --runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs --runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs - --init-nuget Run nuget --version. - Description: This build script installs required tools and runs an MSBuild command on this repository This script can be used to invoke various targets, such as targets to produce packages @@ -211,9 +208,6 @@ while [[ $# -gt 0 ]]; do -ci) ci=true ;; - -init-nuget) - init_nuget=true - ;; -binarylog|-bl) binary_log=true ;; @@ -365,30 +359,6 @@ export MSBUILDDEBUGPATH="$log_dir" _tmp_restore=$restore restore=true -if [[ "$init_nuget" == true ]]; then - InitializeBuildTool - - function RunBuildTool { - "$_InitializeBuildTool" "$@" || { - local exit_code=$? - # We should not Write-PipelineTaskError here because that message shows up in the build summary - # The build already logged an error, that's the reason it failed. Producing an error here only adds noise. - echo "Build failed with exit code $exit_code. Check errors above." - if [[ "$ci" == "true" ]]; then - Write-PipelineSetResult -result "Failed" -message "nuget execution failed." - # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error - # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error - ExitWithExitCode 0 - else - ExitWithExitCode $exit_code - fi - } - } - - echo 'Running dotnet nuget --version (issue: https://github.com/NuGet/Home/issues/12159#issuecomment-1278360511)' - RunBuildTool "nuget" "--version" -fi - InitializeToolset restore=$_tmp_restore= diff --git a/global.json b/global.json index 72e045192a0a..036d4a00133b 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.10", - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22513.4", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22513.4" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22558.4", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22558.4" } } From 4fcc0f029ac87678bbb418f0dda6a6a776627290 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Mon, 14 Nov 2022 19:05:01 +0100 Subject: [PATCH 27/35] Fix linker issues (#45028) --- .../src/ILLink.Descriptors.xml | 5 ++ ...mponents.WebAssembly.Authentication.csproj | 4 ++ .../src/Models/InteractiveRequestOptions.cs | 59 ++++++++++++------- .../src/RemoteAuthenticatorViewCore.Log.cs | 3 + .../src/RemoteAuthenticatorViewCore.cs | 1 + 5 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 src/Components/WebAssembly/WebAssembly.Authentication/src/ILLink.Descriptors.xml diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/ILLink.Descriptors.xml b/src/Components/WebAssembly/WebAssembly.Authentication/src/ILLink.Descriptors.xml new file mode 100644 index 000000000000..a1d22402e971 --- /dev/null +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/ILLink.Descriptors.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj b/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj index 345236f69466..c9bb1d300934 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj @@ -40,6 +40,10 @@ + + + ILLink.Descriptors.xml + diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Models/InteractiveRequestOptions.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/Models/InteractiveRequestOptions.cs index 870b42e3dbfe..56844d476e73 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Models/InteractiveRequestOptions.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Models/InteractiveRequestOptions.cs @@ -14,6 +14,12 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication; [JsonConverter(typeof(Converter))] public sealed class InteractiveRequestOptions { + private static readonly JsonSerializerOptions SerializerOptions = new JsonSerializerOptions + { + MaxDepth = 32, + PropertyNameCaseInsensitive = true, + }; + /// /// Gets the request type. /// @@ -86,17 +92,29 @@ public bool TryRemoveAdditionalParameter(string name) static TValue Deserialize(JsonElement element) => element.Deserialize(); } - internal string ToState() => JsonSerializer.Serialize(this, InteractiveRequestOptionsSerializerContext.Default.InteractiveRequestOptions); - - internal static InteractiveRequestOptions FromState(string state) => JsonSerializer.Deserialize( + [UnconditionalSuppressMessage( + "Trimming", + "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", + Justification = "This method serializes InteractiveRequestOptions which has an 'AdditionalRequestParameters' that might contain user defined types but that have already been annotated by 'TryAddAdditionalParameter'.")] + internal string ToState() => JsonSerializer.Serialize(this, SerializerOptions); + + [UnconditionalSuppressMessage( + "Trimming", + "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", + Justification = "This method deserializes InteractiveRequestOptions which has an 'AdditionalRequestParameters' that might contain user defined types but that have already been annotated by 'TryAddAdditionalParameter'.")] + internal static InteractiveRequestOptions FromState(string state) => JsonSerializer.Deserialize( state, - InteractiveRequestOptionsSerializerContext.Default.InteractiveRequestOptions); + SerializerOptions); internal class Converter : JsonConverter { + [UnconditionalSuppressMessage( + "Trimming", + "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", + Justification = "This converter reads 'AdditionalRequestParameters' that might contain user defined types but that have already been annotated by 'TryAddAdditionalParameter'.")] public override InteractiveRequestOptions Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - var requestOptions = JsonSerializer.Deserialize(ref reader, InteractiveRequestOptionsSerializerContext.Default.OptionsRecord); + var requestOptions = JsonSerializer.Deserialize(ref reader, options); return new InteractiveRequestOptions { @@ -107,26 +125,27 @@ public override InteractiveRequestOptions Read(ref Utf8JsonReader reader, Type t }; } + [UnconditionalSuppressMessage( + "Trimming", + "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", + Justification = "This converter writes 'AdditionalRequestParameters' that might contain user defined types but that have already been annotated by 'TryAddAdditionalParameter'.")] public override void Write(Utf8JsonWriter writer, InteractiveRequestOptions value, JsonSerializerOptions options) { JsonSerializer.Serialize( writer, - new OptionsRecord(value.ReturnUrl, value.Scopes, value.Interaction, value.AdditionalRequestParameters), - InteractiveRequestOptionsSerializerContext.Default.OptionsRecord); + new InteractiveOptions { ReturnUrl = value.ReturnUrl, Scopes = value.Scopes, Interaction = value.Interaction, AdditionalRequestParameters = value.AdditionalRequestParameters }, + options); } - internal record struct OptionsRecord( - [property: JsonInclude] string ReturnUrl, - [property: JsonInclude] IEnumerable Scopes, - [property: JsonInclude] InteractionType Interaction, - [property: JsonInclude] Dictionary AdditionalRequestParameters); - } -} + public struct InteractiveOptions + { + public string ReturnUrl { get; set; } -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, WriteIndented = false)] -[JsonSerializable(typeof(InteractiveRequestOptions))] -[JsonSerializable(typeof(InteractiveRequestOptions.Converter.OptionsRecord))] -[JsonSerializable(typeof(JsonElement))] -internal partial class InteractiveRequestOptionsSerializerContext : JsonSerializerContext -{ + public IEnumerable Scopes { get; set; } + + public InteractionType Interaction { get; set; } + + public Dictionary AdditionalRequestParameters { get; set; } + } + } } diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.Log.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.Log.cs index 2ff49351c5c2..a5ba57a5f2d8 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.Log.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.Log.cs @@ -53,5 +53,8 @@ private static partial class Log [LoggerMessage(15, LogLevel.Debug, "Logout redirect completed successfully.", EventName = nameof(LogoutRedirectCompletedSuccessfully))] public static partial void LogoutRedirectCompletedSuccessfully(ILogger logger); + + [LoggerMessage(16, LogLevel.Debug, "Login request '{Request}'.", EventName = nameof(LoginRequest))] + public static partial void LoginRequest(ILogger logger, string request); } } diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs index 1f2d5788e8df..92739810766d 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs @@ -210,6 +210,7 @@ protected override async Task OnParametersSetAsync() private async Task ProcessLogIn(string returnUrl) { + Log.LoginRequest(Logger, Navigation.HistoryEntryState); AuthenticationState.ReturnUrl = returnUrl; var interactiveRequest = GetCachedNavigationState(); var result = await AuthenticationService.SignInAsync(new RemoteAuthenticationContext From 04fed3c4c1f5afb6a0158f4b60f15a887f1d1558 Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Mon, 14 Nov 2022 13:14:59 -0800 Subject: [PATCH 28/35] [7.0] Match strangely formatted PathBase in HttpSys & IIS #42751 (#45008) * Match strangely formatted PathBase in HttpSys #42751 * Match strangely formatted PathBase in IIS #42751 * Restore IISServerSetupFilter server type check * Fix example * Fix example --- .../HttpSys/src/RequestProcessing/Request.cs | 105 +- .../FunctionalTests/Listener/RequestTests.cs | 38 +- .../test/FunctionalTests/RequestTests.cs | 1 + .../IIS/IIS/src/Core/IISHttpContext.cs | 96 +- src/Servers/IIS/IIS/src/Core/IISHttpServer.cs | 5 + .../IIS/IIS/src/Core/IISServerSetupFilter.cs | 8 - .../IIS/src/WebHostBuilderIISExtensions.cs | 2 +- .../Infrastructure/IIS.SubApp.config | 742 ++++++++++++ .../Infrastructure/IISSubAppSiteCollection.cs | 12 + .../Infrastructure/IISSubAppSiteFixture.cs | 27 + .../RequestPathBaseTests.cs | 103 ++ .../testassets/InProcessWebSite/Startup.cs | 5 + .../src/Http.SubApp.config | 1029 +++++++++++++++++ ...tCore.Server.IntegrationTesting.IIS.csproj | 1 + 14 files changed, 2140 insertions(+), 34 deletions(-) create mode 100644 src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IIS.SubApp.config create mode 100644 src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteCollection.cs create mode 100644 src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteFixture.cs create mode 100644 src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestPathBaseTests.cs create mode 100644 src/Servers/IIS/IntegrationTesting.IIS/src/Http.SubApp.config diff --git a/src/Servers/HttpSys/src/RequestProcessing/Request.cs b/src/Servers/HttpSys/src/RequestProcessing/Request.cs index d0fb349f324f..030f2bcba959 100644 --- a/src/Servers/HttpSys/src/RequestProcessing/Request.cs +++ b/src/Servers/HttpSys/src/RequestProcessing/Request.cs @@ -58,6 +58,7 @@ internal Request(RequestContext requestContext) PathBase = string.Empty; Path = originalPath; + var prefix = requestContext.Server.Options.UrlPrefixes.GetPrefix((int)requestContext.UrlContext); // 'OPTIONS * HTTP/1.1' if (KnownMethod == HttpApiTypes.HTTP_VERB.HttpVerbOPTIONS && string.Equals(RawUrl, "*", StringComparison.Ordinal)) @@ -65,32 +66,98 @@ internal Request(RequestContext requestContext) PathBase = string.Empty; Path = string.Empty; } - else + // Prefix may be null if the requested has been transfered to our queue + else if (prefix is not null) { - var prefix = requestContext.Server.Options.UrlPrefixes.GetPrefix((int)requestContext.UrlContext); - // Prefix may be null if the requested has been transfered to our queue - if (!(prefix is null)) + var pathBase = prefix.PathWithoutTrailingSlash; + + // url: /base/path, prefix: /base/, base: /base, path: /path + // url: /, prefix: /, base: , path: / + if (originalPath.Equals(pathBase, StringComparison.Ordinal)) { - if (originalPath.Length == prefix.PathWithoutTrailingSlash.Length) - { - // They matched exactly except for the trailing slash. - PathBase = originalPath; - Path = string.Empty; - } - else - { - // url: /base/path, prefix: /base/, base: /base, path: /path - // url: /, prefix: /, base: , path: / - PathBase = originalPath.Substring(0, prefix.PathWithoutTrailingSlash.Length); // Preserve the user input casing - Path = originalPath.Substring(prefix.PathWithoutTrailingSlash.Length); - } + // Exact match, no need to preserve the casing + PathBase = pathBase; + Path = string.Empty; } - else if (requestContext.Server.Options.UrlPrefixes.TryMatchLongestPrefix(IsHttps, cookedUrl.GetHost()!, originalPath, out var pathBase, out var path)) + else if (originalPath.Equals(pathBase, StringComparison.OrdinalIgnoreCase)) { + // Preserve the user input casing + PathBase = originalPath; + Path = string.Empty; + } + else if (originalPath.StartsWith(prefix.Path, StringComparison.Ordinal)) + { + // Exact match, no need to preserve the casing PathBase = pathBase; - Path = path; + Path = originalPath[pathBase.Length..]; + } + else if (originalPath.StartsWith(prefix.Path, StringComparison.OrdinalIgnoreCase)) + { + // Preserve the user input casing + PathBase = originalPath[..pathBase.Length]; + Path = originalPath[pathBase.Length..]; + } + else + { + // Http.Sys path base matching is based on the cooked url which applies some non-standard normalizations that we don't use + // like collapsing duplicate slashes "//", converting '\' to '/', and un-escaping "%2F" to '/'. Find the right split and + // ignore the normalizations. + var originalOffset = 0; + var baseOffset = 0; + while (originalOffset < originalPath.Length && baseOffset < pathBase.Length) + { + var baseValue = pathBase[baseOffset]; + var offsetValue = originalPath[originalOffset]; + if (baseValue == offsetValue + || char.ToUpperInvariant(baseValue) == char.ToUpperInvariant(offsetValue)) + { + // case-insensitive match, continue + originalOffset++; + baseOffset++; + } + else if (baseValue == '/' && offsetValue == '\\') + { + // Http.Sys considers these equivalent + originalOffset++; + baseOffset++; + } + else if (baseValue == '/' && originalPath.AsSpan(originalOffset).StartsWith("%2F", StringComparison.OrdinalIgnoreCase)) + { + // Http.Sys un-escapes this + originalOffset += 3; + baseOffset++; + } + else if (baseOffset > 0 && pathBase[baseOffset - 1] == '/' + && (offsetValue == '/' || offsetValue == '\\')) + { + // Duplicate slash, skip + originalOffset++; + } + else if (baseOffset > 0 && pathBase[baseOffset - 1] == '/' + && originalPath.AsSpan(originalOffset).StartsWith("%2F", StringComparison.OrdinalIgnoreCase)) + { + // Duplicate slash equivalent, skip + originalOffset += 3; + } + else + { + // Mismatch, fall back + // The failing test case here is "/base/call//../bat//path1//path2", reduced to "/base/call/bat//path1//path2", + // where http.sys collapses "//" before "../", but we do "../" first. We've lost the context that there were dot segments, + // or duplicate slashes, how do we figure out that "call/" can be eliminated? + originalOffset = 0; + break; + } + } + PathBase = originalPath[..originalOffset]; + Path = originalPath[originalOffset..]; } } + else if (requestContext.Server.Options.UrlPrefixes.TryMatchLongestPrefix(IsHttps, cookedUrl.GetHost()!, originalPath, out var pathBase, out var path)) + { + PathBase = pathBase; + Path = path; + } ProtocolVersion = RequestContext.GetVersion(); diff --git a/src/Servers/HttpSys/test/FunctionalTests/Listener/RequestTests.cs b/src/Servers/HttpSys/test/FunctionalTests/Listener/RequestTests.cs index 0b6b6d5b5eb0..79e1c361380d 100644 --- a/src/Servers/HttpSys/test/FunctionalTests/Listener/RequestTests.cs +++ b/src/Servers/HttpSys/test/FunctionalTests/Listener/RequestTests.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; @@ -138,6 +138,42 @@ public async Task Request_OverlongUTF8Path(string requestPath, string expectedPa } } + [ConditionalTheory] + [InlineData("/", "/", "", "/")] + [InlineData("/base", "/base", "/base", "")] + [InlineData("/base", "/baSe", "/baSe", "")] + [InlineData("/base", "/base/path", "/base", "/path")] + [InlineData("/base", "///base/path1/path2", "///base", "/path1/path2")] + [InlineData("/base/ball", @"/baSe\ball//path1//path2", @"/baSe\ball", "//path1//path2")] + [InlineData("/base/ball", @"/base%2fball//path1//path2", @"/base%2fball", "//path1//path2")] + [InlineData("/base/ball", @"/base%2Fball//path1//path2", @"/base%2Fball", "//path1//path2")] + [InlineData("/base/ball", @"/base%5cball//path1//path2", @"/base\ball", "//path1//path2")] + [InlineData("/base/ball", @"/base%5Cball//path1//path2", @"/base\ball", "//path1//path2")] + [InlineData("/base/ball", "///baSe//ball//path1//path2", "///baSe//ball", "//path1//path2")] + [InlineData("/base/ball", @"/base/\ball//path1//path2", @"/base/\ball", "//path1//path2")] + [InlineData("/base/ball", @"/base/%2fball//path1//path2", @"/base/%2fball", "//path1//path2")] + [InlineData("/base/ball", @"/base/%2Fball//path1//path2", @"/base/%2Fball", "//path1//path2")] + [InlineData("/base/ball", @"/base/%5cball//path1//path2", @"/base/\ball", "//path1//path2")] + [InlineData("/base/ball", @"/base/%5Cball//path1//path2", @"/base/\ball", "//path1//path2")] + [InlineData("/base/ball", @"/base/call/../ball//path1//path2", @"/base/ball", "//path1//path2")] + // The results should be "/base/ball", "//path1//path2", but Http.Sys collapses the "//" before the "../" + // and we don't have a good way of emulating that. + [InlineData("/base/ball", @"/base/call//../ball//path1//path2", @"", "/base/call/ball//path1//path2")] + [InlineData("/base/ball", @"/base/call/.%2e/ball//path1//path2", @"/base/ball", "//path1//path2")] + [InlineData("/base/ball", @"/base/call/.%2E/ball//path1//path2", @"/base/ball", "//path1//path2")] + public async Task Request_WithPathBase(string pathBase, string requestPath, string expectedPathBase, string expectedPath) + { + using var server = Utilities.CreateHttpServerReturnRoot(pathBase, out var root); + var responseTask = SendSocketRequestAsync(root, requestPath); + var context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask); + Assert.Equal(expectedPathBase, context.Request.PathBase); + Assert.Equal(expectedPath, context.Request.Path); + context.Dispose(); + + var response = await responseTask; + Assert.Equal("200", response.Substring(9)); + } + private async Task SendSocketRequestAsync(string address, string path, string method = "GET") { var uri = new Uri(address); diff --git a/src/Servers/HttpSys/test/FunctionalTests/RequestTests.cs b/src/Servers/HttpSys/test/FunctionalTests/RequestTests.cs index c79868361e46..defbee588b18 100644 --- a/src/Servers/HttpSys/test/FunctionalTests/RequestTests.cs +++ b/src/Servers/HttpSys/test/FunctionalTests/RequestTests.cs @@ -208,6 +208,7 @@ public async Task Request_FieldsCanBeSetToNull_Set() [InlineData("/base path/", "/base%20path/sub%20path", "/base path", "/sub path")] [InlineData("/base葉path/", "/base%E8%91%89path/sub%E8%91%89path", "/base葉path", "/sub葉path")] [InlineData("/basepath/", "/basepath/sub%2Fpath", "/basepath", "/sub%2Fpath")] + [InlineData("/base", "///base/path1/path2", "///base", "/path1/path2")] public async Task Request_PathSplitting(string pathBase, string requestPath, string expectedPathBase, string expectedPath) { string root; diff --git a/src/Servers/IIS/IIS/src/Core/IISHttpContext.cs b/src/Servers/IIS/IIS/src/Core/IISHttpContext.cs index e94cd37896cc..a5e7eeee9421 100644 --- a/src/Servers/IIS/IIS/src/Core/IISHttpContext.cs +++ b/src/Servers/IIS/IIS/src/Core/IISHttpContext.cs @@ -143,19 +143,105 @@ protected void InitializeContext() KnownMethod = VerbId; StatusCode = 200; - var originalPath = GetOriginalPath(); + var originalPath = GetOriginalPath() ?? string.Empty; + var pathBase = _server.VirtualPath ?? string.Empty; + if (pathBase.Length > 1 && pathBase[^1] == '/') + { + pathBase = pathBase[..^1]; + } if (KnownMethod == HttpApiTypes.HTTP_VERB.HttpVerbOPTIONS && string.Equals(RawTarget, "*", StringComparison.Ordinal)) { PathBase = string.Empty; Path = string.Empty; } - else + else if (string.IsNullOrEmpty(pathBase) || pathBase == "/") { - // Path and pathbase are unescaped by RequestUriBuilder - // The UsePathBase middleware will modify the pathbase and path correctly PathBase = string.Empty; - Path = originalPath ?? string.Empty; + Path = originalPath; + } + else if (originalPath.Equals(pathBase, StringComparison.Ordinal)) + { + // Exact match, no need to preserve the casing + PathBase = pathBase; + Path = string.Empty; + } + else if (originalPath.Equals(pathBase, StringComparison.OrdinalIgnoreCase)) + { + // Preserve the user input casing + PathBase = originalPath; + Path = string.Empty; + } + else if (originalPath.Length == pathBase.Length + 1 + && originalPath[^1] == '/' + && originalPath.StartsWith(pathBase, StringComparison.Ordinal)) + { + // Exact match, no need to preserve the casing + PathBase = pathBase; + Path = "/"; + } + else if (originalPath.Length == pathBase.Length + 1 + && originalPath[^1] == '/' + && originalPath.StartsWith(pathBase, StringComparison.OrdinalIgnoreCase)) + { + // Preserve the user input casing + PathBase = originalPath[..pathBase.Length]; + Path = "/"; + } + else + { + // Http.Sys path base matching is based on the cooked url which applies some non-standard normalizations that we don't use + // like collapsing duplicate slashes "//", converting '\' to '/', and un-escaping "%2F" to '/'. Find the right split and + // ignore the normalizations. + var originalOffset = 0; + var baseOffset = 0; + while (originalOffset < originalPath.Length && baseOffset < pathBase.Length) + { + var baseValue = pathBase[baseOffset]; + var offsetValue = originalPath[originalOffset]; + if (baseValue == offsetValue + || char.ToUpperInvariant(baseValue) == char.ToUpperInvariant(offsetValue)) + { + // case-insensitive match, continue + originalOffset++; + baseOffset++; + } + else if (baseValue == '/' && offsetValue == '\\') + { + // Http.Sys considers these equivalent + originalOffset++; + baseOffset++; + } + else if (baseValue == '/' && originalPath.AsSpan(originalOffset).StartsWith("%2F", StringComparison.OrdinalIgnoreCase)) + { + // Http.Sys un-escapes this + originalOffset += 3; + baseOffset++; + } + else if (baseOffset > 0 && pathBase[baseOffset - 1] == '/' + && (offsetValue == '/' || offsetValue == '\\')) + { + // Duplicate slash, skip + originalOffset++; + } + else if (baseOffset > 0 && pathBase[baseOffset - 1] == '/' + && originalPath.AsSpan(originalOffset).StartsWith("%2F", StringComparison.OrdinalIgnoreCase)) + { + // Duplicate slash equivalent, skip + originalOffset += 3; + } + else + { + // Mismatch, fall back + // The failing test case here is "/base/call//../bat//path1//path2", reduced to "/base/call/bat//path1//path2", + // where http.sys collapses "//" before "../", but we do "../" first. We've lost the context that there were dot segments, + // or duplicate slashes, how do we figure out that "call/" can be eliminated? + originalOffset = 0; + break; + } + } + PathBase = originalPath[..originalOffset]; + Path = originalPath[originalOffset..]; } var cookedUrl = GetCookedUrl(); diff --git a/src/Servers/IIS/IIS/src/Core/IISHttpServer.cs b/src/Servers/IIS/IIS/src/Core/IISHttpServer.cs index b5ff9c892ac5..44fff105615d 100644 --- a/src/Servers/IIS/IIS/src/Core/IISHttpServer.cs +++ b/src/Servers/IIS/IIS/src/Core/IISHttpServer.cs @@ -27,6 +27,7 @@ internal sealed class IISHttpServer : IServer private readonly IISServerOptions _options; private readonly IISNativeApplication _nativeApplication; private readonly ServerAddressesFeature _serverAddressesFeature; + private readonly string? _virtualPath; private readonly TaskCompletionSource _shutdownSignal = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); private bool? _websocketAvailable; @@ -66,6 +67,8 @@ ILogger logger _logger = logger; _options = options.Value; _serverAddressesFeature = new ServerAddressesFeature(); + var iisConfigData = NativeMethods.HttpGetApplicationProperties(); + _virtualPath = iisConfigData.pwzVirtualApplicationPath; if (_options.ForwardWindowsAuthentication) { @@ -80,6 +83,8 @@ ILogger logger } } + public string? VirtualPath => _virtualPath; + public unsafe Task StartAsync(IHttpApplication application, CancellationToken cancellationToken) where TContext : notnull { _httpServerHandle = GCHandle.Alloc(this); diff --git a/src/Servers/IIS/IIS/src/Core/IISServerSetupFilter.cs b/src/Servers/IIS/IIS/src/Core/IISServerSetupFilter.cs index 4dd107b88272..97a0f0e3b481 100644 --- a/src/Servers/IIS/IIS/src/Core/IISServerSetupFilter.cs +++ b/src/Servers/IIS/IIS/src/Core/IISServerSetupFilter.cs @@ -10,13 +10,6 @@ namespace Microsoft.AspNetCore.Server.IIS.Core; internal sealed class IISServerSetupFilter : IStartupFilter { - private readonly string _virtualPath; - - public IISServerSetupFilter(string virtualPath) - { - _virtualPath = virtualPath; - } - public Action Configure(Action next) { return app => @@ -27,7 +20,6 @@ public Action Configure(Action next) throw new InvalidOperationException("Application is running inside IIS process but is not configured to use IIS server."); } - app.UsePathBase(_virtualPath); next(app); }; } diff --git a/src/Servers/IIS/IIS/src/WebHostBuilderIISExtensions.cs b/src/Servers/IIS/IIS/src/WebHostBuilderIISExtensions.cs index dbaef9307585..8df9cc472aaa 100644 --- a/src/Servers/IIS/IIS/src/WebHostBuilderIISExtensions.cs +++ b/src/Servers/IIS/IIS/src/WebHostBuilderIISExtensions.cs @@ -40,7 +40,7 @@ public static IWebHostBuilder UseIIS(this IWebHostBuilder hostBuilder) services.AddSingleton(new IISNativeApplication(new NativeSafeHandle(iisConfigData.pNativeApplication))); services.AddSingleton(); services.AddTransient(); - services.AddSingleton(new IISServerSetupFilter(iisConfigData.pwzVirtualApplicationPath)); + services.AddSingleton(); services.AddAuthenticationCore(); services.AddSingleton(_ => new ServerIntegratedAuth() { diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IIS.SubApp.config b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IIS.SubApp.config new file mode 100644 index 000000000000..252459a7a36f --- /dev/null +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IIS.SubApp.config @@ -0,0 +1,742 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteCollection.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteCollection.cs new file mode 100644 index 000000000000..66883e6e2e41 --- /dev/null +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteCollection.cs @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Xunit; + +namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; + +[CollectionDefinition(Name)] +public class IISSubAppSiteCollection : ICollectionFixture +{ + public const string Name = nameof(IISSubAppSiteCollection); +} \ No newline at end of file diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteFixture.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteFixture.cs new file mode 100644 index 000000000000..9633bf22d174 --- /dev/null +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/IISSubAppSiteFixture.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.AspNetCore.Server.IntegrationTesting.IIS; + +namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; + +public class IISSubAppSiteFixture : IISTestSiteFixture +{ + public IISSubAppSiteFixture() : base(Configure) + { + } + + private static void Configure(IISDeploymentParameters deploymentParameters) + { + if (deploymentParameters.ServerType == IntegrationTesting.ServerType.IIS) + { + deploymentParameters.ServerConfigTemplateContent = File.ReadAllText("IIS.SubApp.Config"); + } + else // IIS Express + { + using var stream = typeof(IISExpressDeployer).Assembly.GetManifestResourceStream("Microsoft.AspNetCore.Server.IntegrationTesting.IIS.Http.SubApp.config"); + using var reader = new StreamReader(stream); + deploymentParameters.ServerConfigTemplateContent = reader.ReadToEnd(); + } + } +} diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestPathBaseTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestPathBaseTests.cs new file mode 100644 index 000000000000..fbc241469acd --- /dev/null +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/RequestPathBaseTests.cs @@ -0,0 +1,103 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Globalization; +using System.Text; +using Microsoft.AspNetCore.Testing; + +#if !IIS_FUNCTIONALS +using Microsoft.AspNetCore.Server.IIS.FunctionalTests; + +#if IISEXPRESS_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.IISExpress.FunctionalTests; +#elif NEWHANDLER_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewHandler.FunctionalTests; +#elif NEWSHIM_FUNCTIONALS +namespace Microsoft.AspNetCore.Server.IIS.NewShim.FunctionalTests; +#endif + +#else +namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests; +#endif + +[Collection(IISSubAppSiteCollection.Name)] +public class RequestPathBaseTests : FixtureLoggedTest +{ + private readonly IISSubAppSiteFixture _fixture; + + public RequestPathBaseTests(IISSubAppSiteFixture fixture) : base(fixture) + { + _fixture = fixture; + } + + [ConditionalTheory] + [RequiresNewHandler] + [InlineData("/Sub/App/PathAndPathBase", "/Sub/App/PathAndPathBase", "")] + [InlineData("/SUb/APp/PathAndPAthBase", "/SUb/APp/PathAndPAthBase", "")] + [InlineData(@"/Sub\App/PathAndPathBase/", @"/Sub\App/PathAndPathBase", "/")] + [InlineData("/Sub%2FApp/PathAndPathBase/", "/Sub%2FApp/PathAndPathBase", "/")] + [InlineData("/Sub%2fApp/PathAndPathBase/", "/Sub%2fApp/PathAndPathBase", "/")] + [InlineData("/Sub%5cApp/PathAndPathBase/", @"/Sub\App/PathAndPathBase", "/")] + [InlineData("/Sub%5CApp/PathAndPathBase/", @"/Sub\App/PathAndPathBase", "/")] + [InlineData("/Sub/App/PathAndPathBase/Path", "/Sub/App/PathAndPathBase", "/Path")] + [InlineData("/Sub/App/PathANDPathBase/PATH", "/Sub/App/PathANDPathBase", "/PATH")] + public async Task RequestPathBase_Split(string url, string expectedPathBase, string expectedPath) + { + // The test app trims the test name off of the request path and puts it on the PathBase. + // /AppName/TestName/Path + var (status, body) = await SendSocketRequestAsync(url); + Assert.Equal(200, status); + Assert.Equal($"PathBase: {expectedPathBase}; Path: {expectedPath}", body); + } + + [ConditionalTheory] + [RequiresNewHandler] + [InlineData("//Sub/App/PathAndPathBase", "//Sub/App/PathAndPathBase", "")] + [InlineData(@"/\Sub/App/PathAndPathBase/", @"/\Sub/App/PathAndPathBase", "/")] + [InlineData(@"/Sub/\App/PathAndPathBase//path", @"/Sub/\App/PathAndPathBase", "//path")] + [InlineData("/%2FSub/App/PathAndPathBase/", "/%2FSub/App/PathAndPathBase", "/")] + [InlineData("/%5CSub/App/PathAndPathBase/", @"/\Sub/App/PathAndPathBase", "/")] + [InlineData("///Sub/App/PathAndPathBase/path1/path2", "///Sub/App/PathAndPathBase", "/path1/path2")] + [InlineData("/Sub%2F/App/PathAndPathBase/%2FPath", "/Sub%2F/App/PathAndPathBase", "/%2FPath")] + [InlineData(@"/%2F\/Sub/App/PathAndPathBase/Path", @"/%2F\/Sub/App/PathAndPathBase", "/Path")] + [InlineData(@"/Sub/App/PathANDPathBase/PATH", @"/Sub/App/PathANDPathBase", "/PATH")] + [InlineData("/Sub/%5cApp/PathAndPathBase/", @"/Sub/\App/PathAndPathBase", "/")] + [InlineData("//Sub//App/PathAndPathBase//Path", "//Sub//App/PathAndPathBase", "//Path")] + [InlineData(@"/Sub/ball/../App/PathAndPathBase/path1//path2", @"/Sub/App/PathAndPathBase", "/path1//path2")] + [InlineData(@"/Sub//ball/../App/PathAndPathBase/path1//path2", @"/Sub//App/PathAndPathBase", "/path1//path2")] + // The results should be "/Sub//App/PathAndPathBase", "//path1//path2", but Http.Sys collapses the "//" before the "../" + // and we don't have a good way of emulating that. + // [InlineData(@"/Sub/call//../App/PathAndPathBase//path1//path2", @"", "/Sub/call/App/PathAndPathBase//path1//path2")] + [InlineData(@"/Sub/call/.%2e/App/PathAndPathBase//path1//path2", @"/Sub/App/PathAndPathBase", "//path1//path2")] + [InlineData(@"/Sub/call/.%2E/App/PathAndPathBase//path1//path2", @"/Sub/App/PathAndPathBase", "//path1//path2")] + public async Task RequestPathBase_WithDoubleSlashes_Split(string url, string expectedPathBase, string expectedPath) + { + // The test app trims the test name off of the request path and puts it on the PathBase. + // /AppName/TestName/Path + var (status, body) = await SendSocketRequestAsync(url); + Assert.Equal(200, status); + Assert.Equal($"PathBase: {expectedPathBase}; Path: {expectedPath}", body); + } + + private async Task<(int Status, string Body)> SendSocketRequestAsync(string path) + { + using (var connection = _fixture.CreateTestConnection()) + { + await connection.Send( + "GET " + path + " HTTP/1.1", + "Host: " + _fixture.Client.BaseAddress.Authority, + "", + ""); + var headers = await connection.ReceiveHeaders(); + var status = int.Parse(headers[0].Substring(9, 3), CultureInfo.InvariantCulture); + if (headers.Contains("Transfer-Encoding: chunked")) + { + var bytes0 = await connection.ReceiveChunk(); + return (status, Encoding.UTF8.GetString(bytes0.Span)); + } + var length = int.Parse(headers.Single(h => h.StartsWith("Content-Length: ", StringComparison.Ordinal))["Content-Length: ".Length..], CultureInfo.InvariantCulture); + var bytes1 = await connection.Receive(length); + return (status, Encoding.ASCII.GetString(bytes1.Span)); + } + } +} diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs index d394828b9ece..1d46e956edf7 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs +++ b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/Startup.cs @@ -231,6 +231,11 @@ private async Task AuthenticationRestrictedNTLM(HttpContext ctx) } } + private Task PathAndPathBase(HttpContext ctx) + { + return ctx.Response.WriteAsync($"PathBase: {ctx.Request.PathBase.Value}; Path: {ctx.Request.Path.Value}"); + } + private async Task FeatureCollectionSetRequestFeatures(HttpContext ctx) { try diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/Http.SubApp.config b/src/Servers/IIS/IntegrationTesting.IIS/src/Http.SubApp.config new file mode 100644 index 000000000000..ffc83b434151 --- /dev/null +++ b/src/Servers/IIS/IntegrationTesting.IIS/src/Http.SubApp.config @@ -0,0 +1,1029 @@ + + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj b/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj index e6c3f4276dbd..e5f49181de20 100644 --- a/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj +++ b/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj @@ -26,6 +26,7 @@ + From 5f9d17bad66d4a285491eaa536a973c09a08c432 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 14 Nov 2022 13:24:20 -0800 Subject: [PATCH 29/35] Update dependencies from https://github.com/dotnet/arcade build 20221111.2 (#45083) Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Helix.Sdk From Version 7.0.0-beta.22558.4 -> To Version 7.0.0-beta.22561.2 Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 4 ---- eng/Version.Details.xml | 16 ++++++++-------- eng/Versions.props | 4 ++-- global.json | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/NuGet.config b/NuGet.config index 79f3fafadc47..ecf11c3e4032 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,10 +4,8 @@ - - @@ -26,10 +24,8 @@ - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 643e52e6f8c9..dce8e33cb41b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -302,22 +302,22 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime d099f075e45d2aa6007a22b71b45a08758559f80 - + https://github.com/dotnet/arcade - 3f3c360819c5c092d0e4505a67dfe59a33fba557 + f36ea231c234560514ede4c2747897a737ced28f - + https://github.com/dotnet/arcade - 3f3c360819c5c092d0e4505a67dfe59a33fba557 + f36ea231c234560514ede4c2747897a737ced28f - + https://github.com/dotnet/arcade - 3f3c360819c5c092d0e4505a67dfe59a33fba557 + f36ea231c234560514ede4c2747897a737ced28f - + https://github.com/dotnet/arcade - 3f3c360819c5c092d0e4505a67dfe59a33fba557 + f36ea231c234560514ede4c2747897a737ced28f diff --git a/eng/Versions.props b/eng/Versions.props index d48607e8a758..9a0ce6953970 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -134,8 +134,8 @@ 7.0.0 7.0.0 - 7.0.0-beta.22558.4 - 7.0.0-beta.22558.4 + 7.0.0-beta.22561.2 + 7.0.0-beta.22561.2 7.0.0-alpha.1.22505.1 diff --git a/global.json b/global.json index 036d4a00133b..0dde90033d58 100644 --- a/global.json +++ b/global.json @@ -27,7 +27,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.22.10", - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22558.4", - "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22558.4" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22561.2", + "Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22561.2" } } From 462405a953540c5b21a0d818b6d709795eaa2bc8 Mon Sep 17 00:00:00 2001 From: William Godbe Date: Mon, 14 Nov 2022 14:14:53 -0800 Subject: [PATCH 30/35] [release/7.0] Add init-nuget workaround back (#45091) * Adding nuget --version workaround * Adding `init-nuget` to Linux ARM64 (#44745) Co-authored-by: Bruno Oliveira Co-authored-by: Bruno Oliveira --- .azure/pipelines/ci.yml | 6 +++--- eng/build.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index bc52c55d6136..bfb716fa44fb 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -489,13 +489,13 @@ stages: $(_InternalRuntimeDownloadArgs) displayName: Run build.sh - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb $(_BuildArgs) $(_InternalRuntimeDownloadArgs) displayName: Build Debian installers - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm -p:AssetManifestFileName=aspnetcore-Linux_x64.xml $(_BuildArgs) @@ -568,7 +568,7 @@ stages: $(_InternalRuntimeDownloadArgs) displayName: Run build.sh - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml $(_BuildArgs) diff --git a/eng/build.sh b/eng/build.sh index a6b6ba99be44..093b04affdd4 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -33,6 +33,7 @@ target_arch='x64' configuration='' runtime_source_feed='' runtime_source_feed_key='' +init_nuget=false if [ "$(uname)" = "Darwin" ]; then target_os_name='osx' @@ -82,6 +83,8 @@ Options: --runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs --runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs + --init-nuget Run nuget --version. + Description: This build script installs required tools and runs an MSBuild command on this repository This script can be used to invoke various targets, such as targets to produce packages @@ -208,6 +211,9 @@ while [[ $# -gt 0 ]]; do -ci) ci=true ;; + -init-nuget) + init_nuget=true + ;; -binarylog|-bl) binary_log=true ;; @@ -359,6 +365,30 @@ export MSBUILDDEBUGPATH="$log_dir" _tmp_restore=$restore restore=true +if [[ "$init_nuget" == true ]]; then + InitializeBuildTool + + function RunBuildTool { + "$_InitializeBuildTool" "$@" || { + local exit_code=$? + # We should not Write-PipelineTaskError here because that message shows up in the build summary + # The build already logged an error, that's the reason it failed. Producing an error here only adds noise. + echo "Build failed with exit code $exit_code. Check errors above." + if [[ "$ci" == "true" ]]; then + Write-PipelineSetResult -result "Failed" -message "nuget execution failed." + # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error + # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error + ExitWithExitCode 0 + else + ExitWithExitCode $exit_code + fi + } + } + + echo 'Running dotnet nuget --version (issue: https://github.com/NuGet/Home/issues/12159#issuecomment-1278360511)' + RunBuildTool "nuget" "--version" +fi + InitializeToolset restore=$_tmp_restore= From 0384a80e02779e83144ee01a3c62d87dddb86797 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 14 Nov 2022 15:29:57 -0800 Subject: [PATCH 31/35] [release/7.0] Fix predicate evaluation in OutputCacheAttribute (#45027) * Fix predicate evaluation in OutputCacheAttribute Fixes #44739 * Fix typo * Update src/Middleware/OutputCaching/test/OutputCacheAttributeTests.cs Co-authored-by: Brennan Co-authored-by: Sebastien Ros Co-authored-by: Brennan --- .../OutputCaching/src/OutputCacheAttribute.cs | 8 +++++++- .../test/OutputCacheAttributeTests.cs | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/Middleware/OutputCaching/src/OutputCacheAttribute.cs b/src/Middleware/OutputCaching/src/OutputCacheAttribute.cs index 1409f20f5bdc..7194b63948d2 100644 --- a/src/Middleware/OutputCaching/src/OutputCacheAttribute.cs +++ b/src/Middleware/OutputCaching/src/OutputCacheAttribute.cs @@ -66,12 +66,18 @@ internal IOutputCachePolicy BuildPolicy() return _builtPolicy; } - var builder = new OutputCachePolicyBuilder(); + OutputCachePolicyBuilder builder; if (PolicyName != null) { + // Don't add the default policy if a named one is used as it could already contain it + builder = new OutputCachePolicyBuilder(excludeDefaultPolicy: true); builder.AddPolicy(new NamedPolicy(PolicyName)); } + else + { + builder = new(); + } if (_noCache != null && _noCache.Value) { diff --git a/src/Middleware/OutputCaching/test/OutputCacheAttributeTests.cs b/src/Middleware/OutputCaching/test/OutputCacheAttributeTests.cs index cd43d2d58a34..26c4c5bd49b3 100644 --- a/src/Middleware/OutputCaching/test/OutputCacheAttributeTests.cs +++ b/src/Middleware/OutputCaching/test/OutputCacheAttributeTests.cs @@ -48,7 +48,7 @@ public async Task Attribute_CreatesNamedPolicy() var options = new OutputCacheOptions(); options.AddPolicy("MyPolicy", b => b.Expire(TimeSpan.FromSeconds(42))); - var context = TestUtils.CreateTestContext(options: options); + var context = TestUtils.CreateUninitializedContext(options: options); var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.PolicyName)); await attribute.BuildPolicy().CacheRequestAsync(context, cancellation: default); @@ -57,6 +57,20 @@ public async Task Attribute_CreatesNamedPolicy() Assert.Equal(42, context.ResponseExpirationTimeSpan?.TotalSeconds); } + [Fact] + public async Task Attribute_NamedPolicyDoesNotInjectDefaultPolicy() + { + var options = new OutputCacheOptions(); + options.AddPolicy("MyPolicy", b => b.With(x => false).Cache()); + + var context = TestUtils.CreateUninitializedContext(options: options); + + var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.PolicyName)); + await attribute.BuildPolicy().CacheRequestAsync(context, cancellation: default); + + Assert.False(context.EnableOutputCaching); + } + [Fact] public async Task Attribute_CreatesVaryByHeaderPolicy() { From 26e3dfc7f3f3a91ba445ec0f8b1598d12542fb9f Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Tue, 15 Nov 2022 14:59:58 -0800 Subject: [PATCH 32/35] [release/7.0] Use simpler Docker tags (#45115) * [release/7.0] Use simpler Docker tags - `cherry-pick` of 5f4bc82d94f8, Update docker tag to latest schema - This change moves all of the docker images to the -latest tag as part of #10377. - `cherry-pick` of f79f2d1ca12d, Replace -latest docker tags with new schema - We changed the latest tags to not include the -latest suffix, so this change updates those tags to the new schema. nit: Correct timeout of source-build job - not honoured as a top-level parameter to source-build.yml * !fixup! Use rh-ruby26 Co-authored-by: Michelle McDaniel --- .azure/pipelines/ci.yml | 11 ++++++----- eng/docker/rhel.Dockerfile | 2 +- eng/targets/Helix.Common.props | 10 +++++----- src/Installers/Rpm/Directory.Build.targets | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index bfb716fa44fb..4cf7a3c0e909 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -595,7 +595,7 @@ stages: jobName: Linux_musl_x64_build jobDisplayName: "Build: Linux Musl x64" agentOs: Linux - container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-WithNode-20210910135833-c401c85 + container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-WithNode buildArgs: --arch x64 --os-name linux-musl @@ -631,7 +631,7 @@ stages: jobDisplayName: "Build: Linux Musl ARM" agentOs: Linux useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine-20211022152824-78f7860 + container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine buildArgs: --arch arm --os-name linux-musl @@ -666,7 +666,7 @@ stages: jobDisplayName: "Build: Linux Musl ARM64" agentOs: Linux useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine-20211022152824-538077f + container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine buildArgs: --arch arm64 --os-name linux-musl @@ -796,10 +796,11 @@ stages: parameters: platform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-20220809204800-17a4aab' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' buildScript: './eng/build.sh $(_PublishArgs) --no-build-repo-tasks $(_InternalRuntimeDownloadArgs)' skipPublishValidation: true - timeoutInMinutes: 120 + jobProperties: + timeoutInMinutes: 120 # Publish to the BAR and perform source indexing. Wait until everything else is done. - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: diff --git a/eng/docker/rhel.Dockerfile b/eng/docker/rhel.Dockerfile index 7e465bc45f1f..ad17cff96da2 100644 --- a/eng/docker/rhel.Dockerfile +++ b/eng/docker/rhel.Dockerfile @@ -1,5 +1,5 @@ # Dockerfile that creates a container suitable to build dotnet-cli -FROM mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-rpmpkg-20220505130359-d0fa36f +FROM mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-rpmpkg # Setup User to match Host User, and give superuser permissions ARG USER diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props index a008553ec1ad..f15b1a336f32 100644 --- a/eng/targets/Helix.Common.props +++ b/eng/targets/Helix.Common.props @@ -1,11 +1,11 @@ - (Alpine.314.Amd64.Open)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19 - (Debian.11.Amd64.Open)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20211001171307-0ece9b3 - (Fedora.34.Amd64.Open)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210924174119-4f64125 - (Mariner)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620 - (Debian.11.Arm64.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-arm64v8-20211001171229-97d8652 + (Alpine.314.Amd64.Open)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64 + (Debian.11.Amd64.Open)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 + (Fedora.34.Amd64.Open)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix + (Mariner)Ubuntu.2004.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix + (Debian.11.Arm64.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-arm64v8 false diff --git a/src/Installers/Rpm/Directory.Build.targets b/src/Installers/Rpm/Directory.Build.targets index a3f65b11597e..465848e3356e 100644 --- a/src/Installers/Rpm/Directory.Build.targets +++ b/src/Installers/Rpm/Directory.Build.targets @@ -85,7 +85,7 @@ - + Date: Wed, 16 Nov 2022 23:59:33 +0000 Subject: [PATCH 33/35] [internal/release/7.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++++ eng/Version.Details.xml | 36 ++++++++++++++++++------------------ eng/Versions.props | 18 +++++++++--------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/NuGet.config b/NuGet.config index ecf11c3e4032..990881b60287 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,8 +4,10 @@ + + @@ -24,8 +26,10 @@ + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 07ae1902e77d..03a35423ab9a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -53,9 +53,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime d099f075e45d2aa6007a22b71b45a08758559f80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -177,9 +177,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime d099f075e45d2aa6007a22b71b45a08758559f80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 https://github.com/dotnet/source-build-externals @@ -242,9 +242,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime d099f075e45d2aa6007a22b71b45a08758559f80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -262,33 +262,33 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime d099f075e45d2aa6007a22b71b45a08758559f80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - d099f075e45d2aa6007a22b71b45a08758559f80 + f67308b045b90cb188339580ccdb1a3c87763ae5 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index da24219bb97f..4d89d0373784 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -63,16 +63,16 @@ 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0 - 7.0.0-rtm.22518.5 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1 + 7.0.1-servicing.22565.3 7.0.0 7.0.0 7.0.0 - 7.0.0 + 7.0.1 7.0.0 7.0.0 7.0.0 @@ -103,7 +103,7 @@ 7.0.0 7.0.0 7.0.0 - 7.0.0-rtm.22518.5 + 7.0.1-servicing.22565.3 7.0.0 7.0.0 7.0.0 @@ -118,7 +118,7 @@ 7.0.0 7.0.0 7.0.0 - 7.0.0 + 7.0.1 7.0.0 7.0.0 7.0.0 From f04006fd5bc05e736166db03490ad727808b393f Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Thu, 17 Nov 2022 02:26:35 +0000 Subject: [PATCH 34/35] [internal/release/7.0] Update dependencies from dnceng/internal/dotnet-efcore --- NuGet.config | 4 ++-- eng/Version.Details.xml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NuGet.config b/NuGet.config index 990881b60287..f1dd9992bf32 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 03a35423ab9a..b4766b019d91 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -11,35 +11,35 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - baac22d83d49e7f9f36bedc2df8404776c0a3aff + 8b903ca41bb14905902ff8206a318897808cff66 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime From 432e6a061f28dda696ba16bc5442328d23b25d93 Mon Sep 17 00:00:00 2001 From: DotNet Bot Date: Sat, 19 Nov 2022 00:16:11 +0000 Subject: [PATCH 35/35] [internal/release/7.0] Update dependencies from dnceng/internal/dotnet-runtime --- NuGet.config | 4 ++-- eng/Version.Details.xml | 22 +++++++++++----------- eng/Versions.props | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/NuGet.config b/NuGet.config index f1dd9992bf32..4ce746fca290 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,7 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b4766b019d91..6a64970f8a0f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -55,7 +55,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -177,9 +177,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime d099f075e45d2aa6007a22b71b45a08758559f80 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://github.com/dotnet/source-build-externals @@ -244,7 +244,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -264,15 +264,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - f67308b045b90cb188339580ccdb1a3c87763ae5 + 97203d38ba734d76d39984c5206f2747f792fa89 https://github.com/dotnet/xdt diff --git a/eng/Versions.props b/eng/Versions.props index 4d89d0373784..58a9eddcb1d6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -68,7 +68,7 @@ 7.0.1 7.0.1 7.0.1 - 7.0.1-servicing.22565.3 + 7.0.1-servicing.22568.4 7.0.0 7.0.0 7.0.0 @@ -103,7 +103,7 @@ 7.0.0 7.0.0 7.0.0 - 7.0.1-servicing.22565.3 + 7.0.1-servicing.22568.4 7.0.0 7.0.0 7.0.0