瀏覽代碼

Use System.Text.Json's IAsyncEnumerable support (#31894)

## Description

System.Text.Json recently added support for streaming IAsyncEnumerable types based on an ask from the ASP.NET Core team. This PR enables MVC to leverage this feature.

## Customer Impact
Using IAsyncEnumerable with System.Text.Json will result in data to be streamed rather than buffered and serialized.

## Regression?
- [ ] Yes
- [x] No

[If yes, specify the version the behavior has regressed from]

## Risk
- [ ] High
- [ ] Medium
- [x] Low

[Justify the selection above]
The feature has been well-tested in the runtime. This is simply removing additional buffering that was previously performed by MVC before invoking the serializer.

## Verification
- [x] Manual (required)
- [x] Automated

## Packaging changes reviewed?
- [ ] Yes
- [x] No
- [ ] N/A


Addresses https://github.com/dotnet/aspnetcore/issues/11558 https://github.com/dotnet/aspnetcore/issues/23203
Pranav K 4 年之前
父節點
當前提交
af70a2b268

+ 146 - 146
eng/Version.Details.xml

@@ -9,304 +9,304 @@
 -->
 -->
 <Dependencies>
 <Dependencies>
   <ProductDependencies>
   <ProductDependencies>
-    <Dependency Name="dotnet-ef" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="dotnet-ef" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-preview.4.21212.2">
+    <Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-preview.4.21215.1">
       <Uri>https://github.com/dotnet/efcore</Uri>
       <Uri>https://github.com/dotnet/efcore</Uri>
-      <Sha>7af5e17706cf5414b273d1aa4a2d45c2b98cffd0</Sha>
+      <Sha>99166b37d72cb6adca7fe1cb9f8511b8a6dd3192</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Caching.Memory" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Caching.Memory" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.Json" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.Json" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Configuration" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Configuration" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.DependencyInjection" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.DependencyInjection" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Hosting" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Hosting" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Http" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Http" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.Console" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.Console" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.Debug" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.Debug" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Logging" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Logging" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Options" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Options" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.Primitives" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.Primitives" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.AspNetCore.Internal.Transport" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.AspNetCore.Internal.Transport" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Win32.Registry" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Win32.Registry" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.ComponentModel.Annotations" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.ComponentModel.Annotations" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Diagnostics.EventLog" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Diagnostics.EventLog" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.DirectoryServices.Protocols" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.DirectoryServices.Protocols" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.IO.Pipelines" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.IO.Pipelines" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Net.Http.Json" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Net.Http.Json" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Net.Http.WinHttpHandler" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Net.Http.WinHttpHandler" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Reflection.Metadata" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Reflection.Metadata" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Resources.Extensions" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Resources.Extensions" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Security.Cryptography.Cng" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Security.Cryptography.Cng" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Security.Cryptography.Pkcs" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Security.Cryptography.Pkcs" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Security.Cryptography.Xml" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Security.Cryptography.Xml" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Security.Principal.Windows" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Security.Principal.Windows" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.ServiceProcess.ServiceController" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.ServiceProcess.ServiceController" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Text.Encodings.Web" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Text.Encodings.Web" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Text.Json" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Text.Json" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="System.Threading.Channels" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="System.Threading.Channels" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.Extensions.DependencyModel" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.Extensions.DependencyModel" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
     <!--
     <!--
          Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
          Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
          All Runtime.$rid packages should have the same version.
          All Runtime.$rid packages should have the same version.
     -->
     -->
-    <Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.12.Node.win-x64" Version="6.0.0-preview.4.21212.1">
+    <Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.12.Node.win-x64" Version="6.0.0-preview.5.21216.2">
       <Uri>https://github.com/dotnet/emsdk</Uri>
       <Uri>https://github.com/dotnet/emsdk</Uri>
-      <Sha>e51b2a920817aec200d7306b95f616f9451d47a3</Sha>
+      <Sha>4352f818926282e9d5ecbc9d8a411e006d5a7853</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.12.Python.win-x64" Version="6.0.0-preview.4.21212.1">
+    <Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.12.Python.win-x64" Version="6.0.0-preview.5.21216.2">
       <Uri>https://github.com/dotnet/emsdk</Uri>
       <Uri>https://github.com/dotnet/emsdk</Uri>
-      <Sha>e51b2a920817aec200d7306b95f616f9451d47a3</Sha>
+      <Sha>4352f818926282e9d5ecbc9d8a411e006d5a7853</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.12.Sdk.win-x64" Version="6.0.0-preview.4.21212.1">
+    <Dependency Name="Microsoft.NET.Runtime.Emscripten.2.0.12.Sdk.win-x64" Version="6.0.0-preview.5.21216.2">
       <Uri>https://github.com/dotnet/emsdk</Uri>
       <Uri>https://github.com/dotnet/emsdk</Uri>
-      <Sha>e51b2a920817aec200d7306b95f616f9451d47a3</Sha>
+      <Sha>4352f818926282e9d5ecbc9d8a411e006d5a7853</Sha>
     </Dependency>
     </Dependency>
-    <Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
   </ProductDependencies>
   </ProductDependencies>
   <ToolsetDependencies>
   <ToolsetDependencies>
     <!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
     <!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
-    <Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.0-preview.4.21211.7">
+    <Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.0-preview.4.21215.13">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
-      <Sha>355eff52bed00e7ca9d4a6d769ddbe2bbadbea47</Sha>
+      <Sha>d25620b3fe5fba7b8fd7065f2d5947d0a20c6a30</Sha>
     </Dependency>
     </Dependency>
     <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21209.17">
     <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21209.17">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>

+ 75 - 75
eng/Versions.props

@@ -65,81 +65,81 @@
   -->
   -->
   <PropertyGroup Label="Automated">
   <PropertyGroup Label="Automated">
     <!-- Packages from dotnet/runtime -->
     <!-- Packages from dotnet/runtime -->
-    <MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsDependencyModelVersion>
-    <MicrosoftNETCoreAppRefVersion>6.0.0-preview.4.21211.7</MicrosoftNETCoreAppRefVersion>
-    <MicrosoftNETCoreAppRuntimewinx64Version>6.0.0-preview.4.21211.7</MicrosoftNETCoreAppRuntimewinx64Version>
-    <MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.0-preview.4.21211.7</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
-    <MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.0-preview.4.21211.7</MicrosoftNETRuntimeWebAssemblySdkVersion>
-    <MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.0-preview.4.21211.7</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
-    <MicrosoftNETRuntimeEmscripten2012Nodewinx64Version>6.0.0-preview.4.21212.1</MicrosoftNETRuntimeEmscripten2012Nodewinx64Version>
-    <MicrosoftNETRuntimeEmscripten2012Pythonwinx64Version>6.0.0-preview.4.21212.1</MicrosoftNETRuntimeEmscripten2012Pythonwinx64Version>
-    <MicrosoftNETRuntimeEmscripten2012Sdkwinx64Version>6.0.0-preview.4.21212.1</MicrosoftNETRuntimeEmscripten2012Sdkwinx64Version>
-    <MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.0-preview.4.21211.7</MicrosoftNETCoreBrowserDebugHostTransportVersion>
-    <MicrosoftWin32RegistryVersion>6.0.0-preview.4.21211.7</MicrosoftWin32RegistryVersion>
-    <MicrosoftExtensionsCachingAbstractionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsCachingAbstractionsVersion>
-    <MicrosoftExtensionsCachingMemoryVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsCachingMemoryVersion>
-    <MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationAbstractionsVersion>
-    <MicrosoftExtensionsConfigurationBinderVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationBinderVersion>
-    <MicrosoftExtensionsConfigurationCommandLineVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationCommandLineVersion>
-    <MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
-    <MicrosoftExtensionsConfigurationFileExtensionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationFileExtensionsVersion>
-    <MicrosoftExtensionsConfigurationIniVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationIniVersion>
-    <MicrosoftExtensionsConfigurationJsonVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationJsonVersion>
-    <MicrosoftExtensionsConfigurationVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationVersion>
-    <MicrosoftExtensionsConfigurationUserSecretsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationUserSecretsVersion>
-    <MicrosoftExtensionsConfigurationXmlVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsConfigurationXmlVersion>
-    <MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
-    <MicrosoftExtensionsDependencyInjectionVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsDependencyInjectionVersion>
-    <MicrosoftExtensionsFileProvidersAbstractionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsFileProvidersAbstractionsVersion>
-    <MicrosoftExtensionsFileProvidersCompositeVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsFileProvidersCompositeVersion>
-    <MicrosoftExtensionsFileProvidersPhysicalVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsFileProvidersPhysicalVersion>
-    <MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsFileSystemGlobbingVersion>
-    <MicrosoftExtensionsHostFactoryResolverSourcesVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
-    <MicrosoftExtensionsHostingAbstractionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsHostingAbstractionsVersion>
-    <MicrosoftExtensionsHostingVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsHostingVersion>
-    <MicrosoftExtensionsHttpVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsHttpVersion>
-    <MicrosoftExtensionsLoggingAbstractionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingAbstractionsVersion>
-    <MicrosoftExtensionsLoggingConfigurationVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingConfigurationVersion>
-    <MicrosoftExtensionsLoggingConsoleVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingConsoleVersion>
-    <MicrosoftExtensionsLoggingDebugVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingDebugVersion>
-    <MicrosoftExtensionsLoggingEventSourceVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingEventSourceVersion>
-    <MicrosoftExtensionsLoggingEventLogVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingEventLogVersion>
-    <MicrosoftExtensionsLoggingVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingVersion>
-    <MicrosoftExtensionsLoggingTraceSourceVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsLoggingTraceSourceVersion>
-    <MicrosoftExtensionsOptionsConfigurationExtensionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsOptionsConfigurationExtensionsVersion>
-    <MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsOptionsDataAnnotationsVersion>
-    <MicrosoftExtensionsOptionsVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsOptionsVersion>
-    <MicrosoftExtensionsPrimitivesVersion>6.0.0-preview.4.21211.7</MicrosoftExtensionsPrimitivesVersion>
-    <MicrosoftAspNetCoreInternalTransportVersion>6.0.0-preview.4.21211.7</MicrosoftAspNetCoreInternalTransportVersion>
-    <SystemComponentModelAnnotationsVersion>6.0.0-preview.4.21211.7</SystemComponentModelAnnotationsVersion>
-    <SystemDiagnosticsDiagnosticSourceVersion>6.0.0-preview.4.21211.7</SystemDiagnosticsDiagnosticSourceVersion>
-    <SystemDiagnosticsEventLogVersion>6.0.0-preview.4.21211.7</SystemDiagnosticsEventLogVersion>
-    <SystemDirectoryServicesProtocolsVersion>6.0.0-preview.4.21211.7</SystemDirectoryServicesProtocolsVersion>
-    <SystemIOPipelinesVersion>6.0.0-preview.4.21211.7</SystemIOPipelinesVersion>
-    <SystemNetHttpJsonVersion>6.0.0-preview.4.21211.7</SystemNetHttpJsonVersion>
-    <SystemNetHttpWinHttpHandlerVersion>6.0.0-preview.4.21211.7</SystemNetHttpWinHttpHandlerVersion>
-    <SystemReflectionMetadataVersion>6.0.0-preview.4.21211.7</SystemReflectionMetadataVersion>
-    <SystemResourcesExtensionsVersion>6.0.0-preview.4.21211.7</SystemResourcesExtensionsVersion>
-    <SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-preview.4.21211.7</SystemRuntimeCompilerServicesUnsafeVersion>
-    <SystemSecurityCryptographyCngVersion>6.0.0-preview.4.21211.7</SystemSecurityCryptographyCngVersion>
-    <SystemSecurityCryptographyPkcsVersion>6.0.0-preview.4.21211.7</SystemSecurityCryptographyPkcsVersion>
-    <SystemSecurityCryptographyXmlVersion>6.0.0-preview.4.21211.7</SystemSecurityCryptographyXmlVersion>
-    <SystemSecurityPrincipalWindowsVersion>6.0.0-preview.4.21211.7</SystemSecurityPrincipalWindowsVersion>
-    <SystemServiceProcessServiceControllerVersion>6.0.0-preview.4.21211.7</SystemServiceProcessServiceControllerVersion>
-    <SystemTextEncodingsWebVersion>6.0.0-preview.4.21211.7</SystemTextEncodingsWebVersion>
-    <SystemTextJsonVersion>6.0.0-preview.4.21211.7</SystemTextJsonVersion>
-    <SystemThreadingChannelsVersion>6.0.0-preview.4.21211.7</SystemThreadingChannelsVersion>
+    <MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsDependencyModelVersion>
+    <MicrosoftNETCoreAppRefVersion>6.0.0-preview.4.21215.13</MicrosoftNETCoreAppRefVersion>
+    <MicrosoftNETCoreAppRuntimewinx64Version>6.0.0-preview.4.21215.13</MicrosoftNETCoreAppRuntimewinx64Version>
+    <MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.0-preview.4.21215.13</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
+    <MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.0-preview.4.21215.13</MicrosoftNETRuntimeWebAssemblySdkVersion>
+    <MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.0-preview.4.21215.13</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
+    <MicrosoftNETRuntimeEmscripten2012Nodewinx64Version>6.0.0-preview.5.21216.2</MicrosoftNETRuntimeEmscripten2012Nodewinx64Version>
+    <MicrosoftNETRuntimeEmscripten2012Pythonwinx64Version>6.0.0-preview.5.21216.2</MicrosoftNETRuntimeEmscripten2012Pythonwinx64Version>
+    <MicrosoftNETRuntimeEmscripten2012Sdkwinx64Version>6.0.0-preview.5.21216.2</MicrosoftNETRuntimeEmscripten2012Sdkwinx64Version>
+    <MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.0-preview.4.21215.13</MicrosoftNETCoreBrowserDebugHostTransportVersion>
+    <MicrosoftWin32RegistryVersion>6.0.0-preview.4.21215.13</MicrosoftWin32RegistryVersion>
+    <MicrosoftExtensionsCachingAbstractionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsCachingAbstractionsVersion>
+    <MicrosoftExtensionsCachingMemoryVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsCachingMemoryVersion>
+    <MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationAbstractionsVersion>
+    <MicrosoftExtensionsConfigurationBinderVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationBinderVersion>
+    <MicrosoftExtensionsConfigurationCommandLineVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationCommandLineVersion>
+    <MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
+    <MicrosoftExtensionsConfigurationFileExtensionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationFileExtensionsVersion>
+    <MicrosoftExtensionsConfigurationIniVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationIniVersion>
+    <MicrosoftExtensionsConfigurationJsonVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationJsonVersion>
+    <MicrosoftExtensionsConfigurationVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationVersion>
+    <MicrosoftExtensionsConfigurationUserSecretsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationUserSecretsVersion>
+    <MicrosoftExtensionsConfigurationXmlVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsConfigurationXmlVersion>
+    <MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
+    <MicrosoftExtensionsDependencyInjectionVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsDependencyInjectionVersion>
+    <MicrosoftExtensionsFileProvidersAbstractionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsFileProvidersAbstractionsVersion>
+    <MicrosoftExtensionsFileProvidersCompositeVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsFileProvidersCompositeVersion>
+    <MicrosoftExtensionsFileProvidersPhysicalVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsFileProvidersPhysicalVersion>
+    <MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsFileSystemGlobbingVersion>
+    <MicrosoftExtensionsHostFactoryResolverSourcesVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
+    <MicrosoftExtensionsHostingAbstractionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsHostingAbstractionsVersion>
+    <MicrosoftExtensionsHostingVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsHostingVersion>
+    <MicrosoftExtensionsHttpVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsHttpVersion>
+    <MicrosoftExtensionsLoggingAbstractionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingAbstractionsVersion>
+    <MicrosoftExtensionsLoggingConfigurationVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingConfigurationVersion>
+    <MicrosoftExtensionsLoggingConsoleVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingConsoleVersion>
+    <MicrosoftExtensionsLoggingDebugVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingDebugVersion>
+    <MicrosoftExtensionsLoggingEventSourceVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingEventSourceVersion>
+    <MicrosoftExtensionsLoggingEventLogVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingEventLogVersion>
+    <MicrosoftExtensionsLoggingVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingVersion>
+    <MicrosoftExtensionsLoggingTraceSourceVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsLoggingTraceSourceVersion>
+    <MicrosoftExtensionsOptionsConfigurationExtensionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsOptionsConfigurationExtensionsVersion>
+    <MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsOptionsDataAnnotationsVersion>
+    <MicrosoftExtensionsOptionsVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsOptionsVersion>
+    <MicrosoftExtensionsPrimitivesVersion>6.0.0-preview.4.21215.13</MicrosoftExtensionsPrimitivesVersion>
+    <MicrosoftAspNetCoreInternalTransportVersion>6.0.0-preview.4.21215.13</MicrosoftAspNetCoreInternalTransportVersion>
+    <SystemComponentModelAnnotationsVersion>6.0.0-preview.4.21215.13</SystemComponentModelAnnotationsVersion>
+    <SystemDiagnosticsDiagnosticSourceVersion>6.0.0-preview.4.21215.13</SystemDiagnosticsDiagnosticSourceVersion>
+    <SystemDiagnosticsEventLogVersion>6.0.0-preview.4.21215.13</SystemDiagnosticsEventLogVersion>
+    <SystemDirectoryServicesProtocolsVersion>6.0.0-preview.4.21215.13</SystemDirectoryServicesProtocolsVersion>
+    <SystemIOPipelinesVersion>6.0.0-preview.4.21215.13</SystemIOPipelinesVersion>
+    <SystemNetHttpJsonVersion>6.0.0-preview.4.21215.13</SystemNetHttpJsonVersion>
+    <SystemNetHttpWinHttpHandlerVersion>6.0.0-preview.4.21215.13</SystemNetHttpWinHttpHandlerVersion>
+    <SystemReflectionMetadataVersion>6.0.0-preview.4.21215.13</SystemReflectionMetadataVersion>
+    <SystemResourcesExtensionsVersion>6.0.0-preview.4.21215.13</SystemResourcesExtensionsVersion>
+    <SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-preview.4.21215.13</SystemRuntimeCompilerServicesUnsafeVersion>
+    <SystemSecurityCryptographyCngVersion>6.0.0-preview.4.21215.13</SystemSecurityCryptographyCngVersion>
+    <SystemSecurityCryptographyPkcsVersion>6.0.0-preview.4.21215.13</SystemSecurityCryptographyPkcsVersion>
+    <SystemSecurityCryptographyXmlVersion>6.0.0-preview.4.21215.13</SystemSecurityCryptographyXmlVersion>
+    <SystemSecurityPrincipalWindowsVersion>6.0.0-preview.4.21215.13</SystemSecurityPrincipalWindowsVersion>
+    <SystemServiceProcessServiceControllerVersion>6.0.0-preview.4.21215.13</SystemServiceProcessServiceControllerVersion>
+    <SystemTextEncodingsWebVersion>6.0.0-preview.4.21215.13</SystemTextEncodingsWebVersion>
+    <SystemTextJsonVersion>6.0.0-preview.4.21215.13</SystemTextJsonVersion>
+    <SystemThreadingChannelsVersion>6.0.0-preview.4.21215.13</SystemThreadingChannelsVersion>
     <!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
     <!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
-    <MicrosoftNETCorePlatformsVersion>6.0.0-preview.4.21211.7</MicrosoftNETCorePlatformsVersion>
+    <MicrosoftNETCorePlatformsVersion>6.0.0-preview.4.21215.13</MicrosoftNETCorePlatformsVersion>
     <!-- Packages from dotnet/efcore -->
     <!-- Packages from dotnet/efcore -->
-    <dotnetefVersion>6.0.0-preview.4.21212.2</dotnetefVersion>
-    <MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreInMemoryVersion>
-    <MicrosoftEntityFrameworkCoreRelationalVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreRelationalVersion>
-    <MicrosoftEntityFrameworkCoreSqliteVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreSqliteVersion>
-    <MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreSqlServerVersion>
-    <MicrosoftEntityFrameworkCoreToolsVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreToolsVersion>
-    <MicrosoftEntityFrameworkCoreVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreVersion>
-    <MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-preview.4.21212.2</MicrosoftEntityFrameworkCoreDesignVersion>
+    <dotnetefVersion>6.0.0-preview.4.21215.1</dotnetefVersion>
+    <MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreInMemoryVersion>
+    <MicrosoftEntityFrameworkCoreRelationalVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreRelationalVersion>
+    <MicrosoftEntityFrameworkCoreSqliteVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreSqliteVersion>
+    <MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreSqlServerVersion>
+    <MicrosoftEntityFrameworkCoreToolsVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreToolsVersion>
+    <MicrosoftEntityFrameworkCoreVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreVersion>
+    <MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-preview.4.21215.1</MicrosoftEntityFrameworkCoreDesignVersion>
     <!-- Packages from dotnet/arcade -->
     <!-- Packages from dotnet/arcade -->
     <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21209.17</MicrosoftDotNetBuildTasksInstallersVersion>
     <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21209.17</MicrosoftDotNetBuildTasksInstallersVersion>
   </PropertyGroup>
   </PropertyGroup>
@@ -206,8 +206,8 @@
     <MicrosoftWebWebView2Version>1.0.705.50</MicrosoftWebWebView2Version>
     <MicrosoftWebWebView2Version>1.0.705.50</MicrosoftWebWebView2Version>
     <MicrosoftWebXdtVersion>1.4.0</MicrosoftWebXdtVersion>
     <MicrosoftWebXdtVersion>1.4.0</MicrosoftWebXdtVersion>
     <SystemIdentityModelTokensJwtVersion>6.10.0</SystemIdentityModelTokensJwtVersion>
     <SystemIdentityModelTokensJwtVersion>6.10.0</SystemIdentityModelTokensJwtVersion>
-    <NuGetVersioningVersion>5.9.0</NuGetVersioningVersion>
-    <NuGetFrameworksVersion>5.9.0</NuGetFrameworksVersion>
+    <NuGetVersioningVersion>5.10.0-preview.2.7203</NuGetVersioningVersion>
+    <NuGetFrameworksVersion>5.10.0-preview.2.7203</NuGetFrameworksVersion>
     <SystemNetExperimentalMsQuicVersion>5.0.0-alpha.20560.6</SystemNetExperimentalMsQuicVersion>
     <SystemNetExperimentalMsQuicVersion>5.0.0-alpha.20560.6</SystemNetExperimentalMsQuicVersion>
     <!-- Packages from 2.1, 3.1, and 5.0 branches used for site extension build. -->
     <!-- Packages from 2.1, 3.1, and 5.0 branches used for site extension build. -->
     <MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>
     <MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>

+ 2 - 2
global.json

@@ -1,9 +1,9 @@
 {
 {
   "sdk": {
   "sdk": {
-    "version": "6.0.100-preview.3.21168.19"
+    "version": "6.0.100-preview.4.21216.8"
   },
   },
   "tools": {
   "tools": {
-    "dotnet": "6.0.100-preview.3.21168.19",
+    "dotnet": "6.0.100-preview.4.21216.8",
     "runtimes": {
     "runtimes": {
       "dotnet/x64": [
       "dotnet/x64": [
         "2.1.25",
         "2.1.25",

+ 1 - 0
src/Components/WebAssembly/testassets/WasmLinkerTest/WasmLinkerTest.csproj

@@ -3,6 +3,7 @@
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
     <RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
     <RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
     <SelfContained>true</SelfContained>
     <SelfContained>true</SelfContained>
+    <UseMonoRuntime>true</UseMonoRuntime>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore.Metadata" />
     <Reference Include="Microsoft.AspNetCore.Metadata" />

+ 2 - 34
src/Mvc/Mvc.Core/src/Infrastructure/ObjectResultExecutor.cs

@@ -21,8 +21,6 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
     /// </summary>
     /// </summary>
     public class ObjectResultExecutor : IActionResultExecutor<ObjectResult>
     public class ObjectResultExecutor : IActionResultExecutor<ObjectResult>
     {
     {
-        private readonly AsyncEnumerableReader _asyncEnumerableReaderFactory;
-
         /// <summary>
         /// <summary>
         /// Creates a new <see cref="ObjectResultExecutor"/>.
         /// Creates a new <see cref="ObjectResultExecutor"/>.
         /// </summary>
         /// </summary>
@@ -54,8 +52,6 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             FormatterSelector = formatterSelector;
             FormatterSelector = formatterSelector;
             WriterFactory = writerFactory.CreateWriter;
             WriterFactory = writerFactory.CreateWriter;
             Logger = loggerFactory.CreateLogger<ObjectResultExecutor>();
             Logger = loggerFactory.CreateLogger<ObjectResultExecutor>();
-            var options = mvcOptions?.Value ?? throw new ArgumentNullException(nameof(mvcOptions));
-            _asyncEnumerableReaderFactory = new AsyncEnumerableReader(options);
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -103,23 +99,9 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             }
             }
 
 
             var value = result.Value;
             var value = result.Value;
-
-            if (value != null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
-            {
-                return ExecuteAsyncEnumerable(context, result, value, reader);
-            }
-
             return ExecuteAsyncCore(context, result, objectType, value);
             return ExecuteAsyncCore(context, result, objectType, value);
         }
         }
 
 
-        private async Task ExecuteAsyncEnumerable(ActionContext context, ObjectResult result, object asyncEnumerable, Func<object, Task<ICollection>> reader)
-        {
-            Log.BufferingAsyncEnumerable(Logger, asyncEnumerable);
-
-            var enumerated = await reader(asyncEnumerable);
-            await ExecuteAsyncCore(context, result, enumerated.GetType(), enumerated);
-        }
-
         private Task ExecuteAsyncCore(ActionContext context, ObjectResult result, Type? objectType, object? value)
         private Task ExecuteAsyncCore(ActionContext context, ObjectResult result, Type? objectType, object? value)
         {
         {
             var formatterContext = new OutputFormatterWriteContext(
             var formatterContext = new OutputFormatterWriteContext(
@@ -166,21 +148,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             }
             }
         }
         }
 
 
-        private static class Log
-        {
-            private static readonly Action<ILogger, string?, Exception?> _bufferingAsyncEnumerable = LoggerMessage.Define<string?>(
-                LogLevel.Debug,
-                new EventId(1, "BufferingAsyncEnumerable"),
-                "Buffering IAsyncEnumerable instance of type '{Type}'.",
-                skipEnabledCheck: true);
-
-            public static void BufferingAsyncEnumerable(ILogger logger, object asyncEnumerable)
-            {
-                if (logger.IsEnabled(LogLevel.Debug))
-                {
-                    _bufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName, null);
-                }
-            }
-        }
+        // Removed Log.
+        // new EventId(1, "BufferingAsyncEnumerable")
     }
     }
 }
 }

+ 1 - 19
src/Mvc/Mvc.Core/src/Infrastructure/SystemTextJsonResultExecutor.cs

@@ -69,12 +69,6 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             Log.JsonResultExecuting(_logger, result.Value);
             Log.JsonResultExecuting(_logger, result.Value);
 
 
             var value = result.Value;
             var value = result.Value;
-            if (value != null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
-            {
-                Log.BufferingAsyncEnumerable(_logger, value);
-                value = await reader(value);
-            }
-
             var objectType = value?.GetType() ?? typeof(object);
             var objectType = value?.GetType() ?? typeof(object);
 
 
             // Keep this code in sync with SystemTextJsonOutputFormatter
             // Keep this code in sync with SystemTextJsonOutputFormatter
@@ -147,11 +141,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
                 "Executing JsonResult, writing value of type '{Type}'.",
                 "Executing JsonResult, writing value of type '{Type}'.",
                 skipEnabledCheck: true);
                 skipEnabledCheck: true);
 
 
-            private static readonly Action<ILogger, string?, Exception?> _bufferingAsyncEnumerable = LoggerMessage.Define<string?>(
-               LogLevel.Debug,
-               new EventId(2, "BufferingAsyncEnumerable"),
-               "Buffering IAsyncEnumerable instance of type '{Type}'.",
-                skipEnabledCheck: true);
+            // EventId 2 BufferingAsyncEnumerable
 
 
             public static void JsonResultExecuting(ILogger logger, object? value)
             public static void JsonResultExecuting(ILogger logger, object? value)
             {
             {
@@ -161,14 +151,6 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
                     _jsonResultExecuting(logger, type, null);
                     _jsonResultExecuting(logger, type, null);
                 }
                 }
             }
             }
-
-            public static void BufferingAsyncEnumerable(ILogger logger, object asyncEnumerable)
-            {
-                if (logger.IsEnabled(LogLevel.Debug))
-                {
-                    _bufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName, null);
-                }
-            }
         }
         }
     }
     }
 }
 }

+ 43 - 1
src/Mvc/Mvc.Core/test/Formatters/SystemTextJsonOutputFormatterTest.cs

@@ -1,8 +1,10 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 
 using System;
 using System;
+using System.Collections.Generic;
 using System.IO;
 using System.IO;
+using System.Linq;
 using System.Text;
 using System.Text;
 using System.Text.Json;
 using System.Text.Json;
 using System.Text.Json.Serialization;
 using System.Text.Json.Serialization;
@@ -81,6 +83,36 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             await Assert.ThrowsAsync<TimeZoneNotFoundException>(() => formatter.WriteResponseBodyAsync(outputFormatterContext, Encoding.GetEncoding("utf-16")));
             await Assert.ThrowsAsync<TimeZoneNotFoundException>(() => formatter.WriteResponseBodyAsync(outputFormatterContext, Encoding.GetEncoding("utf-16")));
         }
         }
 
 
+        [Fact]
+        public async Task WriteResponseBodyAsync_ForLargeAsyncEnumerable()
+        {
+            // Arrange
+            var expected = new MemoryStream();
+            await JsonSerializer.SerializeAsync(expected, LargeAsync(), new JsonSerializerOptions(JsonSerializerDefaults.Web));
+            var formatter = GetOutputFormatter();
+            var mediaType = MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+            var encoding = CreateOrGetSupportedEncoding(formatter, "utf-8", isDefaultEncoding: true);
+
+            var body = new MemoryStream();
+            var actionContext = GetActionContext(mediaType, body);
+
+            var asyncEnumerable = LargeAsync();
+            var outputFormatterContext = new OutputFormatterWriteContext(
+                actionContext.HttpContext,
+                new TestHttpResponseStreamWriterFactory().CreateWriter,
+                asyncEnumerable.GetType(),
+                asyncEnumerable)
+            {
+                ContentType = new StringSegment(mediaType.ToString()),
+            };
+
+            // Act
+            await formatter.WriteResponseBodyAsync(outputFormatterContext, Encoding.GetEncoding("utf-8"));
+
+            // Assert
+            Assert.Equal(expected.ToArray(), body.ToArray());
+        }
+
         private class Person
         private class Person
         {
         {
             public string Name { get; set; }
             public string Name { get; set; }
@@ -108,5 +140,15 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
                 throw new TimeZoneNotFoundException();
                 throw new TimeZoneNotFoundException();
             }
             }
         }
         }
+
+        private static async IAsyncEnumerable<int> LargeAsync()
+        {
+            await Task.Yield();
+            // MvcOptions.MaxIAsyncEnumerableBufferLimit is 8192. Pick some value larger than that.
+            foreach (var i in Enumerable.Range(0, 9000))
+            {
+                yield return i;
+            }
+        }
     }
     }
 }
 }

+ 27 - 1
src/Mvc/Mvc.Core/test/Infrastructure/AsyncEnumerableReaderTest.cs

@@ -1,4 +1,4 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 
 using System;
 using System;
@@ -190,6 +190,19 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             Assert.Equal(expected, ex.Message);
             Assert.Equal(expected, ex.Message);
         }
         }
 
 
+        [Fact]
+        public async Task Reader_ThrowsIfIAsyncEnumerableThrows()
+        {
+            // Arrange
+            var enumerable = ThrowingAsyncEnumerable();
+            var options = new MvcOptions();
+            var readerFactory = new AsyncEnumerableReader(options);
+
+            // Act & Assert
+            Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
+            await Assert.ThrowsAsync<TimeZoneNotFoundException>(() => reader(enumerable));
+        }
+
         public static async IAsyncEnumerable<string> TestEnumerable(int count = 3)
         public static async IAsyncEnumerable<string> TestEnumerable(int count = 3)
         {
         {
             await Task.Yield();
             await Task.Yield();
@@ -225,5 +238,18 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             IAsyncEnumerator<object> IAsyncEnumerable<object>.GetAsyncEnumerator(CancellationToken cancellationToken)
             IAsyncEnumerator<object> IAsyncEnumerable<object>.GetAsyncEnumerator(CancellationToken cancellationToken)
                 => GetAsyncEnumerator(cancellationToken);
                 => GetAsyncEnumerator(cancellationToken);
         }
         }
+
+        private static async IAsyncEnumerable<string> ThrowingAsyncEnumerable()
+        {
+            await Task.Yield();
+            for (var i = 0; i < 10; i++)
+            {
+                yield return $"Hello {i}";
+                if (i == 5)
+                {
+                   throw new TimeZoneNotFoundException();
+                }
+            }
+        }
     }
     }
 }
 }

+ 2 - 2
src/Mvc/Mvc.Core/test/Infrastructure/JsonResultExecutorTestBase.cs

@@ -333,7 +333,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
         public async Task ExecuteAsync_SerializesAsyncEnumerables()
         public async Task ExecuteAsync_SerializesAsyncEnumerables()
         {
         {
             // Arrange
             // Arrange
-            var expected = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(new[] { "Hello", "world" }));
+            var expected = JsonSerializer.Serialize(new[] { "Hello", "world" });
 
 
             var context = GetActionContext();
             var context = GetActionContext();
             var result = new JsonResult(TestAsyncEnumerable());
             var result = new JsonResult(TestAsyncEnumerable());
@@ -344,7 +344,7 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
 
 
             // Assert
             // Assert
             var written = GetWrittenBytes(context.HttpContext);
             var written = GetWrittenBytes(context.HttpContext);
-            Assert.Equal(expected, written);
+            Assert.Equal(expected, Encoding.UTF8.GetString(written));
         }
         }
 
 
         [Fact]
         [Fact]

+ 0 - 100
src/Mvc/Mvc.Core/test/Infrastructure/ObjectResultExecutorTest.cs

@@ -459,106 +459,6 @@ namespace Microsoft.AspNetCore.Mvc.Infrastructure
             Assert.Null(formatterContext.Object);
             Assert.Null(formatterContext.Object);
         }
         }
 
 
-        [Fact]
-        public async Task ObjectResult_ReadsAsyncEnumerables()
-        {
-            // Arrange
-            var executor = CreateExecutor();
-            var result = new ObjectResult(AsyncEnumerable());
-            var formatter = new TestJsonOutputFormatter();
-            result.Formatters.Add(formatter);
-
-            var actionContext = new ActionContext()
-            {
-                HttpContext = GetHttpContext(),
-            };
-
-            // Act
-            await executor.ExecuteAsync(actionContext, result);
-
-            // Assert
-            var formatterContext = formatter.LastOutputFormatterContext;
-            Assert.Equal(typeof(List<string>), formatterContext.ObjectType);
-            var value = Assert.IsType<List<string>>(formatterContext.Object);
-            Assert.Equal(new[] { "Hello 0", "Hello 1", "Hello 2", "Hello 3", }, value);
-        }
-
-        [Fact]
-        public async Task ObjectResult_Throws_IfEnumerableThrows()
-        {
-            // Arrange
-            var executor = CreateExecutor();
-            var result = new ObjectResult(AsyncEnumerable(throwError: true));
-            var formatter = new TestJsonOutputFormatter();
-            result.Formatters.Add(formatter);
-
-            var actionContext = new ActionContext()
-            {
-                HttpContext = GetHttpContext(),
-            };
-
-            // Act & Assert
-            await Assert.ThrowsAsync<TimeZoneNotFoundException>(() => executor.ExecuteAsync(actionContext, result));
-        }
-
-        [Fact]
-        public async Task ObjectResult_AsyncEnumeration_AtLimit()
-        {
-            // Arrange
-            var count = 24;
-            var executor = CreateExecutor(options: new MvcOptions { MaxIAsyncEnumerableBufferLimit = count });
-            var result = new ObjectResult(AsyncEnumerable(count: count));
-            var formatter = new TestJsonOutputFormatter();
-            result.Formatters.Add(formatter);
-
-            var actionContext = new ActionContext()
-            {
-                HttpContext = GetHttpContext(),
-            };
-
-            // Act
-            await executor.ExecuteAsync(actionContext, result);
-
-            // Assert
-            var formatterContext = formatter.LastOutputFormatterContext;
-            var value = Assert.IsType<List<string>>(formatterContext.Object);
-            Assert.Equal(24, value.Count);
-        }
-
-        [Theory]
-        [InlineData(25)]
-        [InlineData(1024)]
-        public async Task ObjectResult_Throws_IfEnumerationExceedsLimit(int count)
-        {
-            // Arrange
-            var executor = CreateExecutor(options: new MvcOptions { MaxIAsyncEnumerableBufferLimit = 24 });
-            var result = new ObjectResult(AsyncEnumerable(count: count));
-            var formatter = new TestJsonOutputFormatter();
-            result.Formatters.Add(formatter);
-
-            var actionContext = new ActionContext()
-            {
-                HttpContext = GetHttpContext(),
-            };
-
-            // Act & Assert
-            var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => executor.ExecuteAsync(actionContext, result));
-        }
-
-        private static async IAsyncEnumerable<string> AsyncEnumerable(int count = 4, bool throwError = false)
-        {
-            await Task.Yield();
-            for (var i = 0; i < count; i++)
-            {
-                yield return $"Hello {i}";
-            }
-
-            if (throwError)
-            {
-                throw new TimeZoneNotFoundException();
-            }
-        }
-
         private static IServiceCollection CreateServices()
         private static IServiceCollection CreateServices()
         {
         {
             var services = new ServiceCollection();
             var services = new ServiceCollection();

+ 43 - 13
src/Mvc/Mvc.Formatters.Xml/src/XmlDataContractSerializerOutputFormatter.cs

@@ -11,9 +11,11 @@ using System.Threading.Tasks;
 using System.Xml;
 using System.Xml;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc.Formatters.Xml;
 using Microsoft.AspNetCore.Mvc.Formatters.Xml;
+using Microsoft.AspNetCore.Mvc.Infrastructure;
 using Microsoft.AspNetCore.WebUtilities;
 using Microsoft.AspNetCore.WebUtilities;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
 using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
 using Microsoft.Extensions.Options;
 using Microsoft.Extensions.Options;
 
 
 namespace Microsoft.AspNetCore.Mvc.Formatters
 namespace Microsoft.AspNetCore.Mvc.Formatters
@@ -28,6 +30,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
         private readonly ILogger _logger;
         private readonly ILogger _logger;
         private DataContractSerializerSettings _serializerSettings;
         private DataContractSerializerSettings _serializerSettings;
         private MvcOptions _mvcOptions;
         private MvcOptions _mvcOptions;
+        private AsyncEnumerableReader _asyncEnumerableReaderFactory;
 
 
         /// <summary>
         /// <summary>
         /// Initializes a new instance of <see cref="XmlDataContractSerializerOutputFormatter"/>
         /// Initializes a new instance of <see cref="XmlDataContractSerializerOutputFormatter"/>
@@ -86,7 +89,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             };
             };
             WrapperProviderFactories.Add(new EnumerableWrapperProviderFactory(WrapperProviderFactories));
             WrapperProviderFactories.Add(new EnumerableWrapperProviderFactory(WrapperProviderFactories));
 
 
-            _logger = loggerFactory?.CreateLogger(GetType());
+            _logger = loggerFactory?.CreateLogger(GetType()) ?? NullLogger.Instance;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -245,13 +248,29 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             var writerSettings = WriterSettings.Clone();
             var writerSettings = WriterSettings.Clone();
             writerSettings.Encoding = selectedEncoding;
             writerSettings.Encoding = selectedEncoding;
 
 
-            // Wrap the object only if there is a wrapping type.
+            var httpContext = context.HttpContext;
+            var response = httpContext.Response;
+
+            _mvcOptions ??= httpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>().Value;
+            _asyncEnumerableReaderFactory ??= new AsyncEnumerableReader(_mvcOptions);
+
             var value = context.Object;
             var value = context.Object;
-            var wrappingType = GetSerializableType(context.ObjectType);
-            if (wrappingType != null && wrappingType != context.ObjectType)
+            var valueType = context.ObjectType;
+
+            if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
+            {
+                Log.BufferingAsyncEnumerable(_logger, value);
+
+                value = await reader(value);
+                valueType = value.GetType();
+            }
+
+            // Wrap the object only if there is a wrapping type.
+            var wrappingType = GetSerializableType(valueType);
+            if (wrappingType != null && wrappingType != valueType)
             {
             {
                 var wrapperProvider = WrapperProviderFactories.GetWrapperProvider(new WrapperProviderContext(
                 var wrapperProvider = WrapperProviderFactories.GetWrapperProvider(new WrapperProviderContext(
-                    declaredType: context.ObjectType,
+                    declaredType: valueType,
                     isSerialization: true));
                     isSerialization: true));
 
 
                 value = wrapperProvider.Wrap(value);
                 value = wrapperProvider.Wrap(value);
@@ -259,10 +278,6 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
 
 
             var dataContractSerializer = GetCachedSerializer(wrappingType);
             var dataContractSerializer = GetCachedSerializer(wrappingType);
 
 
-            var httpContext = context.HttpContext;
-            var response = httpContext.Response;
-
-            _mvcOptions ??= httpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>().Value;
 
 
             var responseStream = response.Body;
             var responseStream = response.Body;
             FileBufferingWriteStream fileBufferingWriteStream = null;
             FileBufferingWriteStream fileBufferingWriteStream = null;
@@ -276,10 +291,8 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             {
             {
                 await using (var textWriter = context.WriterFactory(responseStream, writerSettings.Encoding))
                 await using (var textWriter = context.WriterFactory(responseStream, writerSettings.Encoding))
                 {
                 {
-                    using (var xmlWriter = CreateXmlWriter(context, textWriter, writerSettings))
-                    {
-                        dataContractSerializer.WriteObject(xmlWriter, value);
-                    }
+                    using var xmlWriter = CreateXmlWriter(context, textWriter, writerSettings);
+                    dataContractSerializer.WriteObject(xmlWriter, value);
                 }
                 }
 
 
                 if (fileBufferingWriteStream != null)
                 if (fileBufferingWriteStream != null)
@@ -314,5 +327,22 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
 
 
             return (DataContractSerializer)serializer;
             return (DataContractSerializer)serializer;
         }
         }
+
+        private static class Log
+        {
+            private static readonly Action<ILogger, string, Exception> _bufferingAsyncEnumerable = LoggerMessage.Define<string>(
+                LogLevel.Debug,
+                new EventId(1, "BufferingAsyncEnumerable"),
+                "Buffering IAsyncEnumerable instance of type '{Type}'.",
+                skipEnabledCheck: true);
+
+            public static void BufferingAsyncEnumerable(ILogger logger, object asyncEnumerable)
+            {
+                if (logger.IsEnabled(LogLevel.Debug))
+                {
+                    _bufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName, null);
+                }
+            }
+        }
     }
     }
 }
 }

+ 40 - 14
src/Mvc/Mvc.Formatters.Xml/src/XmlSerializerOutputFormatter.cs

@@ -9,8 +9,8 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 using System.Xml;
 using System.Xml;
 using System.Xml.Serialization;
 using System.Xml.Serialization;
-using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc.Formatters.Xml;
 using Microsoft.AspNetCore.Mvc.Formatters.Xml;
+using Microsoft.AspNetCore.Mvc.Infrastructure;
 using Microsoft.AspNetCore.WebUtilities;
 using Microsoft.AspNetCore.WebUtilities;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
 using Microsoft.Extensions.Logging;
@@ -27,6 +27,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
         private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
         private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
         private readonly ILogger _logger;
         private readonly ILogger _logger;
         private MvcOptions _mvcOptions;
         private MvcOptions _mvcOptions;
+        private AsyncEnumerableReader _asyncEnumerableReaderFactory;
 
 
         /// <summary>
         /// <summary>
         /// Initializes a new instance of <see cref="XmlSerializerOutputFormatter"/>
         /// Initializes a new instance of <see cref="XmlSerializerOutputFormatter"/>
@@ -221,13 +222,28 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             var writerSettings = WriterSettings.Clone();
             var writerSettings = WriterSettings.Clone();
             writerSettings.Encoding = selectedEncoding;
             writerSettings.Encoding = selectedEncoding;
 
 
-            // Wrap the object only if there is a wrapping type.
+            var httpContext = context.HttpContext;
+            var response = httpContext.Response;
+
+            _mvcOptions ??= httpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>().Value;
+            _asyncEnumerableReaderFactory ??= new AsyncEnumerableReader(_mvcOptions);
+
             var value = context.Object;
             var value = context.Object;
-            var wrappingType = GetSerializableType(context.ObjectType);
-            if (wrappingType != null && wrappingType != context.ObjectType)
+            var valueType = context.ObjectType;
+            if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
+            {
+                Log.BufferingAsyncEnumerable(_logger, value);
+
+                value = await reader(value);
+                valueType = value.GetType();
+            }
+
+            // Wrap the object only if there is a wrapping type.
+            var wrappingType = GetSerializableType(valueType);
+            if (wrappingType != null && wrappingType != valueType)
             {
             {
                 var wrapperProvider = WrapperProviderFactories.GetWrapperProvider(new WrapperProviderContext(
                 var wrapperProvider = WrapperProviderFactories.GetWrapperProvider(new WrapperProviderContext(
-                    declaredType: context.ObjectType,
+                    declaredType: valueType,
                     isSerialization: true));
                     isSerialization: true));
 
 
                 value = wrapperProvider.Wrap(value);
                 value = wrapperProvider.Wrap(value);
@@ -235,11 +251,6 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
 
 
             var xmlSerializer = GetCachedSerializer(wrappingType);
             var xmlSerializer = GetCachedSerializer(wrappingType);
 
 
-            var httpContext = context.HttpContext;
-            var response = httpContext.Response;
-
-            _mvcOptions ??= httpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>().Value;
-
             var responseStream = response.Body;
             var responseStream = response.Body;
             FileBufferingWriteStream fileBufferingWriteStream = null;
             FileBufferingWriteStream fileBufferingWriteStream = null;
             if (!_mvcOptions.SuppressOutputFormatterBuffering)
             if (!_mvcOptions.SuppressOutputFormatterBuffering)
@@ -252,10 +263,8 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             {
             {
                 await using (var textWriter = context.WriterFactory(responseStream, selectedEncoding))
                 await using (var textWriter = context.WriterFactory(responseStream, selectedEncoding))
                 {
                 {
-                    using (var xmlWriter = CreateXmlWriter(context, textWriter, writerSettings))
-                    {
-                        Serialize(xmlSerializer, xmlWriter, value);
-                    }
+                    using var xmlWriter = CreateXmlWriter(context, textWriter, writerSettings);
+                    Serialize(xmlSerializer, xmlWriter, value);
                 }
                 }
 
 
                 if (fileBufferingWriteStream != null)
                 if (fileBufferingWriteStream != null)
@@ -302,5 +311,22 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
 
 
             return (XmlSerializer)serializer;
             return (XmlSerializer)serializer;
         }
         }
+
+        private static class Log
+        {
+            private static readonly Action<ILogger, string, Exception> _bufferingAsyncEnumerable = LoggerMessage.Define<string>(
+                LogLevel.Debug,
+                new EventId(1, "BufferingAsyncEnumerable"),
+                "Buffering IAsyncEnumerable instance of type '{Type}'.",
+                skipEnabledCheck: true);
+
+            public static void BufferingAsyncEnumerable(ILogger logger, object asyncEnumerable)
+            {
+                if (logger.IsEnabled(LogLevel.Debug))
+                {
+                    _bufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName, null);
+                }
+            }
+        }
     }
     }
 }
 }

+ 35 - 6
src/Mvc/Mvc.NewtonsoftJson/src/NewtonsoftJsonOutputFormatter.cs

@@ -3,12 +3,14 @@
 
 
 using System;
 using System;
 using System.Buffers;
 using System.Buffers;
+using System.Collections;
 using System.IO;
 using System.IO;
 using System.Text;
 using System.Text;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc.NewtonsoftJson;
 using Microsoft.AspNetCore.Mvc.NewtonsoftJson;
 using Microsoft.AspNetCore.WebUtilities;
 using Microsoft.AspNetCore.WebUtilities;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
 using Newtonsoft.Json;
 using Newtonsoft.Json;
 
 
 namespace Microsoft.AspNetCore.Mvc.Formatters
 namespace Microsoft.AspNetCore.Mvc.Formatters
@@ -20,7 +22,9 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
     {
     {
         private readonly IArrayPool<char> _charPool;
         private readonly IArrayPool<char> _charPool;
         private readonly MvcOptions _mvcOptions;
         private readonly MvcOptions _mvcOptions;
+        private readonly AsyncEnumerableReader _asyncEnumerableReaderFactory;
         private JsonSerializerSettings? _serializerSettings;
         private JsonSerializerSettings? _serializerSettings;
+        private ILogger? _logger;
 
 
         /// <summary>
         /// <summary>
         /// Initializes a new <see cref="NewtonsoftJsonOutputFormatter"/> instance.
         /// Initializes a new <see cref="NewtonsoftJsonOutputFormatter"/> instance.
@@ -56,6 +60,8 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
             SupportedMediaTypes.Add(MediaTypeHeaderValues.ApplicationJson);
             SupportedMediaTypes.Add(MediaTypeHeaderValues.ApplicationJson);
             SupportedMediaTypes.Add(MediaTypeHeaderValues.TextJson);
             SupportedMediaTypes.Add(MediaTypeHeaderValues.TextJson);
             SupportedMediaTypes.Add(MediaTypeHeaderValues.ApplicationAnyJsonSyntax);
             SupportedMediaTypes.Add(MediaTypeHeaderValues.ApplicationAnyJsonSyntax);
+
+            _asyncEnumerableReaderFactory = new AsyncEnumerableReader(_mvcOptions);
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -139,15 +145,21 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
                 responseStream = fileBufferingWriteStream;
                 responseStream = fileBufferingWriteStream;
             }
             }
 
 
+            var value = context.Object;
+            if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
+            {
+                _logger ??= context.HttpContext.RequestServices.GetRequiredService<ILogger<NewtonsoftJsonOutputFormatter>>();
+                Log.BufferingAsyncEnumerable(_logger, value);
+                value = await reader(value);
+            }
+
             try
             try
             {
             {
                 await using (var writer = context.WriterFactory(responseStream, selectedEncoding))
                 await using (var writer = context.WriterFactory(responseStream, selectedEncoding))
                 {
                 {
-                    using (var jsonWriter = CreateJsonWriter(writer))
-                    {
-                        var jsonSerializer = CreateJsonSerializer(context);
-                        jsonSerializer.Serialize(jsonWriter, context.Object);
-                    }
+                    using var jsonWriter = CreateJsonWriter(writer);
+                    var jsonSerializer = CreateJsonSerializer(context);
+                    jsonSerializer.Serialize(jsonWriter, value);
                 }
                 }
 
 
                 if (fileBufferingWriteStream != null)
                 if (fileBufferingWriteStream != null)
@@ -202,5 +214,22 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
 
 
             return copiedSettings;
             return copiedSettings;
         }
         }
+
+        private static class Log
+        {
+            private static readonly Action<ILogger, string?, Exception?> _bufferingAsyncEnumerable = LoggerMessage.Define<string?>(
+                LogLevel.Debug,
+                new EventId(1, "BufferingAsyncEnumerable"),
+                "Buffering IAsyncEnumerable instance of type '{Type}'.",
+                skipEnabledCheck: true);
+
+            public static void BufferingAsyncEnumerable(ILogger logger, object asyncEnumerable)
+            {
+                if (logger.IsEnabled(LogLevel.Debug))
+                {
+                    _bufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName, null);
+                }
+            }
+        }
     }
     }
 }
 }

+ 2 - 0
src/Mvc/test/Mvc.FunctionalTests/ErrorPageTests.cs

@@ -80,6 +80,8 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
 
 
             static void ConfigureRuntimeCompilationOptions(MvcRazorRuntimeCompilationOptions options)
             static void ConfigureRuntimeCompilationOptions(MvcRazorRuntimeCompilationOptions options)
             {
             {
+                options.AdditionalReferencePaths.Add(typeof(string).Assembly.Location);
+
                 // Workaround for incorrectly generated deps file. The build output has all of the binaries required to compile. We'll grab these and
                 // Workaround for incorrectly generated deps file. The build output has all of the binaries required to compile. We'll grab these and
                 // add it to the list of assemblies runtime compilation uses.
                 // add it to the list of assemblies runtime compilation uses.
                 foreach (var path in Directory.EnumerateFiles(AppContext.BaseDirectory, "*.dll"))
                 foreach (var path in Directory.EnumerateFiles(AppContext.BaseDirectory, "*.dll"))

+ 17 - 11
src/ProjectTemplates/Shared/TemplatePackageInstaller.cs

@@ -120,6 +120,23 @@ namespace Templates.Test.Helpers
 
 
              * We don't want to construct this path so we'll rely on dotnet new --uninstall --help to construct the uninstall command.
              * We don't want to construct this path so we'll rely on dotnet new --uninstall --help to construct the uninstall command.
              */
              */
+            // Workaround for https://github.com/dotnet/sdk/issues/16906
+            // await UninstallExistingTemplatesAsync(output);
+
+            foreach (var packagePath in builtPackages)
+            {
+                output.WriteLine($"Installing templates package {packagePath}...");
+                var result = await RunDotNetNew(output, $"--install \"{packagePath}\"");
+                Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
+            }
+
+            await VerifyCanFindTemplate(output, "webapp");
+            await VerifyCanFindTemplate(output, "web");
+            await VerifyCanFindTemplate(output, "react");
+        }
+
+        private static async Task UninstallExistingTemplatesAsync(ITestOutputHelper output)
+        {
             var proc = await RunDotNetNew(output, "--uninstall --help");
             var proc = await RunDotNetNew(output, "--uninstall --help");
             var lines = proc.Output.Split(Environment.NewLine);
             var lines = proc.Output.Split(Environment.NewLine);
 
 
@@ -145,17 +162,6 @@ namespace Templates.Test.Helpers
             await VerifyCannotFindTemplateAsync(output, "react");
             await VerifyCannotFindTemplateAsync(output, "react");
             await VerifyCannotFindTemplateAsync(output, "reactredux");
             await VerifyCannotFindTemplateAsync(output, "reactredux");
             await VerifyCannotFindTemplateAsync(output, "angular");
             await VerifyCannotFindTemplateAsync(output, "angular");
-
-            foreach (var packagePath in builtPackages)
-            {
-                output.WriteLine($"Installing templates package {packagePath}...");
-                var result = await RunDotNetNew(output, $"--install \"{packagePath}\"");
-                Assert.True(result.ExitCode == 0, result.GetFormattedOutput());
-            }
-
-            await VerifyCanFindTemplate(output, "webapp");
-            await VerifyCanFindTemplate(output, "web");
-            await VerifyCanFindTemplate(output, "react");
         }
         }
 
 
         private static async Task VerifyCanFindTemplate(ITestOutputHelper output, string templateName)
         private static async Task VerifyCanFindTemplate(ITestOutputHelper output, string templateName)

+ 1 - 0
src/Servers/IIS/IIS/test/Common.FunctionalTests/StartupTests.cs

@@ -422,6 +422,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
         }
         }
 
 
         [ConditionalFact]
         [ConditionalFact]
+        [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/31893")]
         [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H2, SkipReason = "Shutdown hangs https://github.com/dotnet/aspnetcore/issues/25107")]
         [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H2, SkipReason = "Shutdown hangs https://github.com/dotnet/aspnetcore/issues/25107")]
         public async Task RemoveInProcessReference_FailedToFindRequestHandler()
         public async Task RemoveInProcessReference_FailedToFindRequestHandler()
         {
         {

+ 4 - 0
src/Servers/Kestrel/Transport.Quic/src/AssemblyInfo.cs

@@ -2,5 +2,9 @@
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 
 using System.Runtime.CompilerServices;
 using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
 
 
 [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
 [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
+[assembly: SupportedOSPlatform("windows")]
+[assembly: SupportedOSPlatform("macos")]
+[assembly: SupportedOSPlatform("linux")]