diff --git a/Directory.Build.targets b/Directory.Build.targets index 1e1a4d93b26a..4712f2352485 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -138,6 +138,25 @@ $(BuildDependsOn);_CopySymbolsToArtifacts + + + $(Features);runtime-async=on + + + + + $(Features);runtime-async=on + + true diff --git a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.WarningSuppressions.xml b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.WarningSuppressions.xml index e179ca1a04b3..91235bbf293d 100644 --- a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.WarningSuppressions.xml +++ b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.WarningSuppressions.xml @@ -83,13 +83,13 @@ ILLink IL2026 member - M:Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter.<ReadRequestBodyAsync>d__9.MoveNext + M:Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter.ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext,System.Text.Encoding) ILLink IL2026 member - M:Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.<WriteResponseBodyAsync>d__5.MoveNext + M:Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext,System.Text.Encoding) ILLink @@ -101,7 +101,7 @@ ILLink IL2026 member - M:Microsoft.AspNetCore.Mvc.Infrastructure.SystemTextJsonResultExecutor.<ExecuteAsync>d__4.MoveNext + M:Microsoft.AspNetCore.Mvc.Infrastructure.SystemTextJsonResultExecutor.ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext,Microsoft.AspNetCore.Mvc.JsonResult) ILLink @@ -113,13 +113,13 @@ ILLink IL2026 member - M:Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.<BindComplexCollectionFromIndexes>d__22.MoveNext + M:Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.BindComplexCollectionFromIndexes(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext,System.Collections.Generic.IEnumerable{System.String}) ILLink IL2026 member - M:Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinder.<BindPropertyAsync>d__15.MoveNext + M:Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinder.BindPropertyAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext,Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder,System.String,System.String) ILLink @@ -131,7 +131,7 @@ ILLink IL2026 member - M:Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder.<BindProperty>d__11.MoveNext + M:Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder.BindProperty(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext,Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,System.String,System.String) ILLink diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs index 053c7340f3a7..da38bd2c5bd9 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpConnectionManagerTests.cs @@ -21,6 +21,7 @@ public class HttpConnectionManagerTests : LoggedTest #if !DEBUG [ConditionalFact] [NoDebuggerCondition] + [QuarantinedTest("https://github.com/dotnet/runtime/issues/126735")] public async Task CriticalErrorLoggedIfApplicationDoesntComplete() { //////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/Hubs.cs b/src/SignalR/clients/csharp/Client/test/FunctionalTests/Hubs.cs index 17d09d87818c..f22b370075cc 100644 --- a/src/SignalR/clients/csharp/Client/test/FunctionalTests/Hubs.cs +++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/Hubs.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Reactive.Linq; using System.Threading.Channels; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; @@ -150,11 +151,13 @@ public class DynamicTestHub : DynamicHub public ChannelReader StreamBroken() => TestHubMethodsImpl.StreamBroken(); + [RuntimeAsyncMethodGeneration(false)] public async Task CallEcho(string message) { await Clients.Client(Context.ConnectionId).Echo(message); } + [RuntimeAsyncMethodGeneration(false)] public async Task CallHandlerThatDoesntExist() { await Clients.Client(Context.ConnectionId).NoClientHandler(); diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/RuntimeAsyncMethodGenerationAttribute.cs b/src/SignalR/clients/csharp/Client/test/FunctionalTests/RuntimeAsyncMethodGenerationAttribute.cs new file mode 100644 index 000000000000..137d30feae90 --- /dev/null +++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/RuntimeAsyncMethodGenerationAttribute.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +// Polyfill: RuntimeAsyncMethodGenerationAttribute is not yet public API +namespace System.Runtime.CompilerServices; + +[AttributeUsage(AttributeTargets.Method)] +internal sealed class RuntimeAsyncMethodGenerationAttribute(bool runtimeAsync) : Attribute +{ + public bool RuntimeAsync { get; } = runtimeAsync; +}