diff --git a/docs/benchmarkdotnet.md b/docs/benchmarkdotnet.md
index f8c9e222849..be429f57ad7 100644
--- a/docs/benchmarkdotnet.md
+++ b/docs/benchmarkdotnet.md
@@ -289,7 +289,7 @@ M00_L00:
The `--runtimes` or just `-r` allows you to run the benchmarks for **multiple Runtimes**.
-Available options are: Mono, wasmnet70, CoreRT, net462, net47, net471, net472, netcoreapp3.1, net6.0, net7.0, net8.0, and net9.0.
+Available options are: Mono, wasmnet70, CoreRT, netcoreapp3.1, net6.0, net7.0, net8.0, and net9.0.
Example: run the benchmarks for .NET 7.0 and 8.0:
@@ -361,18 +361,6 @@ dotnet run -c Release -f net9.0 --cli "C:\Projects\performance\.dotnet\dotnet.ex
This is very useful when you want to compare different builds of .NET.
-### Private CLR Build
-
-It's possible to benchmark a private build of .NET Runtime. You just need to pass the value of `COMPLUS_Version` to BenchmarkDotNet. You can do that by either using `--clrVersion $theVersion` as an argument or `Job.ShortRun.With(new ClrRuntime(version: "$theVersion"))` in the code.
-
-So if you made a change in CLR and want to measure the difference, you can run the benchmarks with:
-
-```cmd
-dotnet run -c Release -f net48 -- --clrVersion $theVersion
-```
-
-More info can be found in [BenchmarkDotNet issue #706](https://github.com/dotnet/BenchmarkDotNet/issues/706).
-
### Private CoreRT Build
To run benchmarks with private CoreRT build you need to provide the `IlcPath`. Example:
diff --git a/eng/Versions.props b/eng/Versions.props
index a045425ef6c..07ade91729c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -11,7 +11,7 @@
11.0.0-preview.5.26261.10111.0.0-preview.5.26261.10111.0.0-preview.5.26261.101
- 0.16.0-nightly.20260320.467
+ 0.16.0-nightly.20260518.124911.0.0-preview.5.26261.10111.0.0-prerelease.26204.1
diff --git a/scripts/ci_setup.py b/scripts/ci_setup.py
index e622a9fe69b..07c0a95733f 100644
--- a/scripts/ci_setup.py
+++ b/scripts/ci_setup.py
@@ -424,6 +424,11 @@ def main(args: CiSetupArgs):
if args.experiment_name == "jitoptrepeat":
experiment_config = variable_format % ('DOTNET_JitOptRepeat', '*')
+ if args.experiment_name == "runtimeasync":
+ # Surfaced to MSBuild as the $(EnableRuntimeAsync) property; gates the
+ # runtime-async Features flag in src/Directory.Build.targets.
+ experiment_config = variable_format % ('EnableRuntimeAsync', 'true')
+
output = ''
with push_dir(get_repo_root_path()):
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 96647e856eb..b168fcecc65 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -5,27 +5,27 @@
false
-
+
latest
-
+
False
-
+
$(NoWarn);NU1507$(NoWarn);NETSDK1138$(NoWarn);CS9057True4
-
+
Truefalsefalse
-
+
false
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
new file mode 100644
index 00000000000..63d3b91f501
--- /dev/null
+++ b/src/Directory.Build.targets
@@ -0,0 +1,11 @@
+
+
+
+
+
+ $(Features);runtime-async=on
+
+
\ No newline at end of file
diff --git a/src/benchmarks/micro/MicroBenchmarks.csproj b/src/benchmarks/micro/MicroBenchmarks.csproj
index 179557c61d4..d7b14d9336f 100644
--- a/src/benchmarks/micro/MicroBenchmarks.csproj
+++ b/src/benchmarks/micro/MicroBenchmarks.csproj
@@ -122,14 +122,6 @@
-
-
-
-
-
-
-
-
diff --git a/src/benchmarks/micro/Program.cs b/src/benchmarks/micro/Program.cs
index 121d9dd9b98..8d2a590cae9 100644
--- a/src/benchmarks/micro/Program.cs
+++ b/src/benchmarks/micro/Program.cs
@@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
+using System.Threading.Tasks;
using BenchmarkDotNet.Running;
using System.IO;
using BenchmarkDotNet.Extensions;
@@ -14,7 +15,7 @@ namespace MicroBenchmarks
{
class Program
{
- static int Main(string[] args)
+ static async Task Main(string[] args)
{
var argsList = new List(args);
int? partitionCount;
@@ -40,9 +41,14 @@ static int Main(string[] args)
return 1;
}
- return BenchmarkSwitcher
+ // Use RunAsync (not Run) so BDN does not install its single-threaded
+ // BenchmarkDotNetSynchronizationContext on the entrypoint thread. The sync
+ // entrypoint installs that context before benchmark discovery, which
+ // deadlocks any sync-over-async work performed by [ParamsSource]/[ArgumentsSource]
+ // callbacks (e.g. SslStreamTests.GetTls13Support).
+ var summaries = await BenchmarkSwitcher
.FromAssembly(typeof(Program).Assembly)
- .Run(argsList.ToArray(),
+ .RunAsync(argsList.ToArray(),
RecommendedConfig.Create(
artifactsPath: new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "BenchmarkDotNet.Artifacts")),
mandatoryCategories: ImmutableHashSet.Create([Categories.Libraries, Categories.Runtime, Categories.ThirdParty, Categories.Sve]),
@@ -52,7 +58,9 @@ static int Main(string[] args)
categoryExclusionFilterValue: categoryExclusionFilterValue,
getDiffableDisasm: getDiffableDisasm)
.AddValidator(new NoWasmValidator(Categories.NoWASM)))
- .ToExitCode();
+ .ConfigureAwait(false);
+
+ return summaries.ToExitCode();
}
}
}
\ No newline at end of file
diff --git a/src/benchmarks/micro/README.md b/src/benchmarks/micro/README.md
index 590edec71af..d19ed650f5f 100644
--- a/src/benchmarks/micro/README.md
+++ b/src/benchmarks/micro/README.md
@@ -12,7 +12,7 @@ To learn more about designing benchmarks, please read [Microbenchmark Design Gui
## Quick Start
-The first thing that you need to choose is the Target Framework. Available options are: `netcoreapp3.1|net6.0|net7.0|net8.0|net9.0|net10.0|net11.0|net472`. You can specify the target framework using `-f|--framework` argument. For the sake of simplicity, all examples below use `net11.0` as the target framework.
+The first thing that you need to choose is the Target Framework. Available options are: `net8.0|net9.0|net10.0|net11.0`. You can specify the target framework using `-f|--framework` argument. For the sake of simplicity, all examples below use `net11.0` as the target framework.
The following commands are run from the `src/benchmarks/micro` directory.
diff --git a/src/harness/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj b/src/harness/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj
index ef8782db2aa..a54dc819171 100644
--- a/src/harness/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj
+++ b/src/harness/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj
@@ -1,7 +1,11 @@
Library
- netstandard2.0
+
+ net8.0enabletrue
@@ -13,7 +17,7 @@
-
+
diff --git a/src/harness/BenchmarkDotNet.Extensions/DiffableDisassemblyExporter.cs b/src/harness/BenchmarkDotNet.Extensions/DiffableDisassemblyExporter.cs
index 44f81dd29e9..3124e82c546 100644
--- a/src/harness/BenchmarkDotNet.Extensions/DiffableDisassemblyExporter.cs
+++ b/src/harness/BenchmarkDotNet.Extensions/DiffableDisassemblyExporter.cs
@@ -61,26 +61,26 @@ internal static string BuildDisassemblyString(DisassemblyResult disassemblyResul
private static Func