diff --git a/NuGet.Config b/NuGet.Config
index 855812b5a5..7507704b8b 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -13,5 +13,6 @@
+
diff --git a/src/BenchmarkDotNet.Annotations/Jobs/RuntimeMoniker.cs b/src/BenchmarkDotNet.Annotations/Jobs/RuntimeMoniker.cs
index 78541a763f..4ad24192e2 100644
--- a/src/BenchmarkDotNet.Annotations/Jobs/RuntimeMoniker.cs
+++ b/src/BenchmarkDotNet.Annotations/Jobs/RuntimeMoniker.cs
@@ -115,6 +115,11 @@ public enum RuntimeMoniker
///
Net90,
+ ///
+ /// .NET 10.0
+ ///
+ Net10_0,
+
///
/// NativeAOT compiled as net6.0
///
@@ -135,6 +140,11 @@ public enum RuntimeMoniker
///
NativeAot90,
+ ///
+ /// NativeAOT compiled as net10.0
+ ///
+ NativeAot10_0,
+
///
/// WebAssembly with default .Net version
///
@@ -165,6 +175,11 @@ public enum RuntimeMoniker
///
WasmNet90,
+ ///
+ /// WebAssembly with net10.0
+ ///
+ WasmNet10_0,
+
///
/// Mono with the Ahead of Time LLVM Compiler backend
///
@@ -190,6 +205,11 @@ public enum RuntimeMoniker
///
MonoAOTLLVMNet90,
+ ///
+ /// Mono with the Ahead of Time LLVM Compiler backend and net10.0
+ ///
+ MonoAOTLLVMNet10_0,
+
///
/// .NET 6 using MonoVM (not CLR which is the default)
///
@@ -209,5 +229,10 @@ public enum RuntimeMoniker
/// .NET 9 using MonoVM (not CLR which is the default)
///
Mono90,
+
+ ///
+ /// .NET 10 using MonoVM (not CLR which is the default)
+ ///
+ Mono10_0,
}
}
diff --git a/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs b/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs
index c61f308fcc..b7d23e9275 100644
--- a/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs
+++ b/src/BenchmarkDotNet.Diagnostics.dotMemory/DotMemoryDiagnoser.cs
@@ -81,6 +81,7 @@ internal override bool IsSupported(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.Net70:
case RuntimeMoniker.Net80:
case RuntimeMoniker.Net90:
+ case RuntimeMoniker.Net10_0:
return true;
case RuntimeMoniker.NotRecognized:
case RuntimeMoniker.Mono:
@@ -88,21 +89,25 @@ internal override bool IsSupported(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.NativeAot70:
case RuntimeMoniker.NativeAot80:
case RuntimeMoniker.NativeAot90:
+ case RuntimeMoniker.NativeAot10_0:
case RuntimeMoniker.Wasm:
case RuntimeMoniker.WasmNet50:
case RuntimeMoniker.WasmNet60:
case RuntimeMoniker.WasmNet70:
case RuntimeMoniker.WasmNet80:
case RuntimeMoniker.WasmNet90:
+ case RuntimeMoniker.WasmNet10_0:
case RuntimeMoniker.MonoAOTLLVM:
case RuntimeMoniker.MonoAOTLLVMNet60:
case RuntimeMoniker.MonoAOTLLVMNet70:
case RuntimeMoniker.MonoAOTLLVMNet80:
case RuntimeMoniker.MonoAOTLLVMNet90:
+ case RuntimeMoniker.MonoAOTLLVMNet10_0:
case RuntimeMoniker.Mono60:
case RuntimeMoniker.Mono70:
case RuntimeMoniker.Mono80:
case RuntimeMoniker.Mono90:
+ case RuntimeMoniker.Mono10_0:
#pragma warning disable CS0618 // Type or member is obsolete
case RuntimeMoniker.NetCoreApp50:
#pragma warning restore CS0618 // Type or member is obsolete
@@ -113,4 +118,4 @@ internal override bool IsSupported(RuntimeMoniker runtimeMoniker)
throw new ArgumentOutOfRangeException(nameof(runtimeMoniker), runtimeMoniker, $"Runtime moniker {runtimeMoniker} is not supported");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs b/src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs
index b650ab84fa..0dded47443 100644
--- a/src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs
+++ b/src/BenchmarkDotNet.Diagnostics.dotTrace/DotTraceDiagnoser.cs
@@ -84,6 +84,7 @@ internal override bool IsSupported(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.Net70:
case RuntimeMoniker.Net80:
case RuntimeMoniker.Net90:
+ case RuntimeMoniker.Net10_0:
return true;
case RuntimeMoniker.NotRecognized:
case RuntimeMoniker.Mono:
@@ -91,21 +92,25 @@ internal override bool IsSupported(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.NativeAot70:
case RuntimeMoniker.NativeAot80:
case RuntimeMoniker.NativeAot90:
+ case RuntimeMoniker.NativeAot10_0:
case RuntimeMoniker.Wasm:
case RuntimeMoniker.WasmNet50:
case RuntimeMoniker.WasmNet60:
case RuntimeMoniker.WasmNet70:
case RuntimeMoniker.WasmNet80:
case RuntimeMoniker.WasmNet90:
+ case RuntimeMoniker.WasmNet10_0:
case RuntimeMoniker.MonoAOTLLVM:
case RuntimeMoniker.MonoAOTLLVMNet60:
case RuntimeMoniker.MonoAOTLLVMNet70:
case RuntimeMoniker.MonoAOTLLVMNet80:
case RuntimeMoniker.MonoAOTLLVMNet90:
+ case RuntimeMoniker.MonoAOTLLVMNet10_0:
case RuntimeMoniker.Mono60:
case RuntimeMoniker.Mono70:
case RuntimeMoniker.Mono80:
case RuntimeMoniker.Mono90:
+ case RuntimeMoniker.Mono10_0:
#pragma warning disable CS0618 // Type or member is obsolete
case RuntimeMoniker.NetCoreApp50:
#pragma warning restore CS0618 // Type or member is obsolete
@@ -116,4 +121,4 @@ internal override bool IsSupported(RuntimeMoniker runtimeMoniker)
throw new ArgumentOutOfRangeException(nameof(runtimeMoniker), runtimeMoniker, $"Runtime moniker {runtimeMoniker} is not supported");
}
}
-}
\ No newline at end of file
+}
diff --git a/src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs b/src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs
index 9ec37c39eb..a49d95f1fe 100644
--- a/src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs
+++ b/src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs
@@ -528,6 +528,7 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
case RuntimeMoniker.Net70:
case RuntimeMoniker.Net80:
case RuntimeMoniker.Net90:
+ case RuntimeMoniker.Net10_0:
return baseJob
.WithRuntime(runtimeMoniker.GetRuntime())
.WithToolchain(CsProjCoreToolchain.From(new NetCoreAppSettings(runtimeId, null, runtimeId, options.CliPath?.FullName, options.RestorePath?.FullName)));
@@ -547,6 +548,9 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
case RuntimeMoniker.NativeAot90:
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json");
+ case RuntimeMoniker.NativeAot10_0:
+ return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json");
+
case RuntimeMoniker.Wasm:
return MakeWasmJob(baseJob, options, RuntimeInformation.IsNetCore ? CoreRuntime.GetCurrentVersion().MsBuildMoniker : "net5.0", runtimeMoniker);
@@ -565,6 +569,9 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
case RuntimeMoniker.WasmNet90:
return MakeWasmJob(baseJob, options, "net9.0", runtimeMoniker);
+ case RuntimeMoniker.WasmNet10_0:
+ return MakeWasmJob(baseJob, options, "net10.0", runtimeMoniker);
+
case RuntimeMoniker.MonoAOTLLVM:
return MakeMonoAOTLLVMJob(baseJob, options, RuntimeInformation.IsNetCore ? CoreRuntime.GetCurrentVersion().MsBuildMoniker : "net6.0", runtimeMoniker);
@@ -580,6 +587,9 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
case RuntimeMoniker.MonoAOTLLVMNet90:
return MakeMonoAOTLLVMJob(baseJob, options, "net9.0", runtimeMoniker);
+ case RuntimeMoniker.MonoAOTLLVMNet10_0:
+ return MakeMonoAOTLLVMJob(baseJob, options, "net10.0", runtimeMoniker);
+
case RuntimeMoniker.Mono60:
return MakeMonoJob(baseJob, options, MonoRuntime.Mono60);
@@ -592,6 +602,9 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
case RuntimeMoniker.Mono90:
return MakeMonoJob(baseJob, options, MonoRuntime.Mono90);
+ case RuntimeMoniker.Mono10_0:
+ return MakeMonoJob(baseJob, options, MonoRuntime.Mono10_0);
+
default:
throw new NotSupportedException($"Runtime {runtimeId} is not supported");
}
diff --git a/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs b/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs
index 335bd1a871..66f918338c 100644
--- a/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs
+++ b/src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs
@@ -25,8 +25,9 @@ public class CoreRuntime : Runtime
public static readonly CoreRuntime Core70 = new (RuntimeMoniker.Net70, "net7.0", ".NET 7.0");
public static readonly CoreRuntime Core80 = new (RuntimeMoniker.Net80, "net8.0", ".NET 8.0");
public static readonly CoreRuntime Core90 = new (RuntimeMoniker.Net90, "net9.0", ".NET 9.0");
+ public static readonly CoreRuntime Core10_0 = new (RuntimeMoniker.Net10_0, "net10.0", ".NET 10.0");
- public static CoreRuntime Latest => Core90; // when dotnet/runtime branches for 10.0, this will need to get updated
+ public static CoreRuntime Latest => Core10_0; // when dotnet/runtime branches for 11.0, this will need to get updated
private CoreRuntime(RuntimeMoniker runtimeMoniker, string msBuildMoniker, string displayName)
: base(runtimeMoniker, msBuildMoniker, displayName)
@@ -74,6 +75,7 @@ internal static CoreRuntime FromVersion(Version version)
case Version v when v.Major == 7 && v.Minor == 0: return GetPlatformSpecific(Core70);
case Version v when v.Major == 8 && v.Minor == 0: return GetPlatformSpecific(Core80);
case Version v when v.Major == 9 && v.Minor == 0: return GetPlatformSpecific(Core90);
+ case Version v when v.Major == 10 && v.Minor == 0: return GetPlatformSpecific(Core10_0);
default:
return version >= new Version(3, 1)
? CreateForNewVersion($"net{version.Major}.{version.Minor}", $".NET {version.Major}.{version.Minor}")
diff --git a/src/BenchmarkDotNet/Environments/Runtimes/MonoRuntime.cs b/src/BenchmarkDotNet/Environments/Runtimes/MonoRuntime.cs
index 5862d1390c..15b5a02669 100644
--- a/src/BenchmarkDotNet/Environments/Runtimes/MonoRuntime.cs
+++ b/src/BenchmarkDotNet/Environments/Runtimes/MonoRuntime.cs
@@ -10,6 +10,7 @@ public class MonoRuntime : Runtime, IEquatable
public static readonly MonoRuntime Mono70 = new ("Mono with .NET 7.0", RuntimeMoniker.Mono70, "net7.0", isDotNetBuiltIn: true);
public static readonly MonoRuntime Mono80 = new ("Mono with .NET 8.0", RuntimeMoniker.Mono80, "net8.0", isDotNetBuiltIn: true);
public static readonly MonoRuntime Mono90 = new ("Mono with .NET 9.0", RuntimeMoniker.Mono90, "net9.0", isDotNetBuiltIn: true);
+ public static readonly MonoRuntime Mono10_0 = new ("Mono with .NET 10.0", RuntimeMoniker.Mono10_0, "net10.0", isDotNetBuiltIn: true);
public string CustomPath { get; }
diff --git a/src/BenchmarkDotNet/Environments/Runtimes/NativeAotRuntime.cs b/src/BenchmarkDotNet/Environments/Runtimes/NativeAotRuntime.cs
index f1f49c5dca..bff018558e 100644
--- a/src/BenchmarkDotNet/Environments/Runtimes/NativeAotRuntime.cs
+++ b/src/BenchmarkDotNet/Environments/Runtimes/NativeAotRuntime.cs
@@ -22,6 +22,10 @@ public class NativeAotRuntime : Runtime
/// NativeAOT compiled as net9.0
///
public static readonly NativeAotRuntime Net90 = new NativeAotRuntime(RuntimeMoniker.NativeAot90, "net9.0", "NativeAOT 9.0");
+ ///
+ /// NativeAOT compiled as net10.0
+ ///
+ public static readonly NativeAotRuntime Net10_0 = new NativeAotRuntime(RuntimeMoniker.NativeAot10_0, "net10.0", "NativeAOT 10.0");
public override bool IsAOT => true;
@@ -48,6 +52,7 @@ public static NativeAotRuntime GetCurrentVersion()
case Version v when v.Major == 7 && v.Minor == 0: return Net70;
case Version v when v.Major == 8 && v.Minor == 0: return Net80;
case Version v when v.Major == 9 && v.Minor == 0: return Net90;
+ case Version v when v.Major == 10 && v.Minor == 0: return Net10_0;
default:
return new NativeAotRuntime(RuntimeMoniker.NotRecognized, $"net{version.Major}.{version.Minor}", $"NativeAOT {version.Major}.{version.Minor}");
}
diff --git a/src/BenchmarkDotNet/Extensions/RuntimeMonikerExtensions.cs b/src/BenchmarkDotNet/Extensions/RuntimeMonikerExtensions.cs
index 03d44c1ba7..ab905bd21e 100644
--- a/src/BenchmarkDotNet/Extensions/RuntimeMonikerExtensions.cs
+++ b/src/BenchmarkDotNet/Extensions/RuntimeMonikerExtensions.cs
@@ -39,6 +39,8 @@ internal static Runtime GetRuntime(this RuntimeMoniker runtimeMoniker)
return CoreRuntime.Core80;
case RuntimeMoniker.Net90:
return CoreRuntime.Core90;
+ case RuntimeMoniker.Net10_0:
+ return CoreRuntime.Core10_0;
case RuntimeMoniker.Mono:
return MonoRuntime.Default;
case RuntimeMoniker.NativeAot60:
@@ -47,16 +49,16 @@ internal static Runtime GetRuntime(this RuntimeMoniker runtimeMoniker)
return NativeAotRuntime.Net70;
case RuntimeMoniker.NativeAot80:
return NativeAotRuntime.Net80;
- case RuntimeMoniker.NativeAot90:
- return NativeAotRuntime.Net90;
+ case RuntimeMoniker.NativeAot10_0:
+ return NativeAotRuntime.Net10_0;
case RuntimeMoniker.Mono60:
return MonoRuntime.Mono60;
case RuntimeMoniker.Mono70:
return MonoRuntime.Mono70;
case RuntimeMoniker.Mono80:
return MonoRuntime.Mono80;
- case RuntimeMoniker.Mono90:
- return MonoRuntime.Mono90;
+ case RuntimeMoniker.Mono10_0:
+ return MonoRuntime.Mono10_0;
default:
throw new ArgumentOutOfRangeException(nameof(runtimeMoniker), runtimeMoniker, "Runtime Moniker not supported");
}
diff --git a/src/BenchmarkDotNet/Toolchains/CsProj/CsProjCoreToolchain.cs b/src/BenchmarkDotNet/Toolchains/CsProj/CsProjCoreToolchain.cs
index 65fa9239d2..5e88641187 100644
--- a/src/BenchmarkDotNet/Toolchains/CsProj/CsProjCoreToolchain.cs
+++ b/src/BenchmarkDotNet/Toolchains/CsProj/CsProjCoreToolchain.cs
@@ -29,6 +29,7 @@ public class CsProjCoreToolchain : Toolchain, IEquatable
[PublicAPI] public static readonly IToolchain NetCoreApp70 = From(NetCoreAppSettings.NetCoreApp70);
[PublicAPI] public static readonly IToolchain NetCoreApp80 = From(NetCoreAppSettings.NetCoreApp80);
[PublicAPI] public static readonly IToolchain NetCoreApp90 = From(NetCoreAppSettings.NetCoreApp90);
+ [PublicAPI] public static readonly IToolchain NetCoreApp10_0 = From(NetCoreAppSettings.NetCoreApp10_0);
internal CsProjCoreToolchain(string name, IGenerator generator, IBuilder builder, IExecutor executor, string customDotNetCliPath)
: base(name, generator, builder, executor)
diff --git a/src/BenchmarkDotNet/Toolchains/DotNetCli/MsBuildErrorMapper.cs b/src/BenchmarkDotNet/Toolchains/DotNetCli/MsBuildErrorMapper.cs
index f8f159ff96..9c95be192f 100644
--- a/src/BenchmarkDotNet/Toolchains/DotNetCli/MsBuildErrorMapper.cs
+++ b/src/BenchmarkDotNet/Toolchains/DotNetCli/MsBuildErrorMapper.cs
@@ -91,6 +91,8 @@ private static string Map(Capture capture)
return "net8.0";
case ".NETCoreApp,Version=v9.0":
return "net9.0";
+ case ".NETCoreApp,Version=v10.0":
+ return "net10.0";
default:
return capture.Value; // we don't want to throw for future versions of .NET
}
diff --git a/src/BenchmarkDotNet/Toolchains/DotNetCli/NetCoreAppSettings.cs b/src/BenchmarkDotNet/Toolchains/DotNetCli/NetCoreAppSettings.cs
index 9da421396f..7427b167d1 100644
--- a/src/BenchmarkDotNet/Toolchains/DotNetCli/NetCoreAppSettings.cs
+++ b/src/BenchmarkDotNet/Toolchains/DotNetCli/NetCoreAppSettings.cs
@@ -24,6 +24,7 @@ public class NetCoreAppSettings
[PublicAPI] public static readonly NetCoreAppSettings NetCoreApp70 = new ("net7.0", null, ".NET 7.0");
[PublicAPI] public static readonly NetCoreAppSettings NetCoreApp80 = new ("net8.0", null, ".NET 8.0");
[PublicAPI] public static readonly NetCoreAppSettings NetCoreApp90 = new ("net9.0", null, ".NET 9.0");
+ [PublicAPI] public static readonly NetCoreAppSettings NetCoreApp10_0 = new ("net10.0", null, ".NET 10.0");
///
///
diff --git a/src/BenchmarkDotNet/Toolchains/Mono/MonoToolchain.cs b/src/BenchmarkDotNet/Toolchains/Mono/MonoToolchain.cs
index 56f2ebaa56..222eb2111b 100644
--- a/src/BenchmarkDotNet/Toolchains/Mono/MonoToolchain.cs
+++ b/src/BenchmarkDotNet/Toolchains/Mono/MonoToolchain.cs
@@ -12,6 +12,7 @@ public class MonoToolchain : CsProjCoreToolchain, IEquatable
[PublicAPI] public static readonly IToolchain Mono70 = From(new NetCoreAppSettings("net7.0", null, "mono70"));
[PublicAPI] public static readonly IToolchain Mono80 = From(new NetCoreAppSettings("net8.0", null, "mono80"));
[PublicAPI] public static readonly IToolchain Mono90 = From(new NetCoreAppSettings("net9.0", null, "mono90"));
+ [PublicAPI] public static readonly IToolchain Mono10_0 = From(new NetCoreAppSettings("net10.0", null, "mono10_0"));
private MonoToolchain(string name, IGenerator generator, IBuilder builder, IExecutor executor, string customDotNetCliPath)
: base(name, generator, builder, executor, customDotNetCliPath)
diff --git a/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchain.cs b/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchain.cs
index 2ef6dd8a23..9d476bf0e0 100644
--- a/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchain.cs
+++ b/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchain.cs
@@ -40,6 +40,14 @@ public class NativeAotToolchain : Toolchain
.TargetFrameworkMoniker("net9.0")
.ToToolchain();
+ ///
+ /// compiled as net10.0, targets latest NativeAOT build from the .NET 10 feed: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json
+ ///
+ public static readonly IToolchain Net10_0 = CreateBuilder()
+ .UseNuGet("", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json")
+ .TargetFrameworkMoniker("net10.0")
+ .ToToolchain();
+
internal NativeAotToolchain(string displayName,
string ilCompilerVersion,
string runtimeFrameworkVersion, string targetFrameworkMoniker, string runtimeIdentifier,
diff --git a/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs b/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs
index fc352ea50d..1bd248e5eb 100644
--- a/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs
+++ b/src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs
@@ -53,8 +53,8 @@ public NativeAotToolchainBuilder UseLocalBuild(DirectoryInfo ilcPackages)
if (!ilcPackages.Exists) throw new DirectoryNotFoundException($"{ilcPackages} provided as {nameof(ilcPackages)} does NOT exist");
Feeds["local"] = ilcPackages.FullName;
- ilCompilerVersion = "9.0.0-dev";
- Feeds["dotnet9"] = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json";
+ ilCompilerVersion = "10.0.0-dev";
+ Feeds["dotnet10"] = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json";
useTempFolderForRestore = true;
DisplayName("local ILCompiler build");
diff --git a/src/BenchmarkDotNet/Toolchains/ToolchainExtensions.cs b/src/BenchmarkDotNet/Toolchains/ToolchainExtensions.cs
index 75d2898d0a..ba8b3c6863 100644
--- a/src/BenchmarkDotNet/Toolchains/ToolchainExtensions.cs
+++ b/src/BenchmarkDotNet/Toolchains/ToolchainExtensions.cs
@@ -66,6 +66,7 @@ internal static IToolchain GetToolchain(this Runtime runtime, Descriptor? descri
RuntimeMoniker.Mono70 => GetToolchain(RuntimeMoniker.Net70),
RuntimeMoniker.Mono80 => GetToolchain(RuntimeMoniker.Net80),
RuntimeMoniker.Mono90 => GetToolchain(RuntimeMoniker.Net90),
+ RuntimeMoniker.Mono10_0 => GetToolchain(RuntimeMoniker.Net10_0),
_ => CsProjCoreToolchain.From(new NetCoreAppSettings(mono.MsBuildMoniker, null, mono.Name))
};
}
@@ -143,6 +144,9 @@ private static IToolchain GetToolchain(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.Net90:
return CsProjCoreToolchain.NetCoreApp90;
+ case RuntimeMoniker.Net10_0:
+ return CsProjCoreToolchain.NetCoreApp10_0;
+
case RuntimeMoniker.NativeAot60:
return NativeAotToolchain.Net60;
@@ -155,6 +159,9 @@ private static IToolchain GetToolchain(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.NativeAot90:
return NativeAotToolchain.Net90;
+ case RuntimeMoniker.NativeAot10_0:
+ return NativeAotToolchain.Net10_0;
+
case RuntimeMoniker.Mono60:
return MonoToolchain.Mono60;
@@ -167,6 +174,9 @@ private static IToolchain GetToolchain(RuntimeMoniker runtimeMoniker)
case RuntimeMoniker.Mono90:
return MonoToolchain.Mono90;
+ case RuntimeMoniker.Mono10_0:
+ return MonoToolchain.Mono10_0;
+
default:
throw new ArgumentOutOfRangeException(nameof(runtimeMoniker), runtimeMoniker, "RuntimeMoniker not supported");
}
diff --git a/src/BenchmarkDotNet/Validators/DotNetSdkVersionValidator.cs b/src/BenchmarkDotNet/Validators/DotNetSdkVersionValidator.cs
index 65474451c0..14965a436d 100644
--- a/src/BenchmarkDotNet/Validators/DotNetSdkVersionValidator.cs
+++ b/src/BenchmarkDotNet/Validators/DotNetSdkVersionValidator.cs
@@ -216,25 +216,30 @@ private static Version GetSdkVersionFromMoniker(RuntimeMoniker runtimeMoniker)
RuntimeMoniker.Net70 => new Version(7, 0),
RuntimeMoniker.Net80 => new Version(8, 0),
RuntimeMoniker.Net90 => new Version(9, 0),
+ RuntimeMoniker.Net10_0 => new Version(10, 0),
RuntimeMoniker.NativeAot60 => new Version(6, 0),
RuntimeMoniker.NativeAot70 => new Version(7, 0),
RuntimeMoniker.NativeAot80 => new Version(8, 0),
RuntimeMoniker.NativeAot90 => new Version(9, 0),
+ RuntimeMoniker.NativeAot10_0 => new Version(10, 0),
RuntimeMoniker.Mono60 => new Version(6, 0),
RuntimeMoniker.Mono70 => new Version(7, 0),
RuntimeMoniker.Mono80 => new Version(8, 0),
RuntimeMoniker.Mono90 => new Version(9, 0),
+ RuntimeMoniker.Mono10_0 => new Version(10, 0),
RuntimeMoniker.Wasm => Portability.RuntimeInformation.IsNetCore && CoreRuntime.TryGetVersion(out var version) ? version : new Version(5, 0),
RuntimeMoniker.WasmNet50 => new Version(5, 0),
RuntimeMoniker.WasmNet60 => new Version(6, 0),
RuntimeMoniker.WasmNet70 => new Version(7, 0),
RuntimeMoniker.WasmNet80 => new Version(8, 0),
RuntimeMoniker.WasmNet90 => new Version(9, 0),
+ RuntimeMoniker.WasmNet10_0 => new Version(10, 0),
RuntimeMoniker.MonoAOTLLVM => Portability.RuntimeInformation.IsNetCore && CoreRuntime.TryGetVersion(out var version) ? version : new Version(6, 0),
RuntimeMoniker.MonoAOTLLVMNet60 => new Version(6, 0),
RuntimeMoniker.MonoAOTLLVMNet70 => new Version(7, 0),
RuntimeMoniker.MonoAOTLLVMNet80 => new Version(8, 0),
RuntimeMoniker.MonoAOTLLVMNet90 => new Version(9, 0),
+ RuntimeMoniker.MonoAOTLLVMNet10_0 => new Version(10, 0),
_ => throw new NotImplementedException($"SDK version check not implemented for {runtimeMoniker}")
};
}
diff --git a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json
index 12a8c08785..108d1248cb 100644
--- a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json
+++ b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json
@@ -34,6 +34,14 @@
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
+ {
+ "choice": "net10.0",
+ "description": ".NET 10"
+ },
+ {
+ "choice": "net9.0",
+ "description": ".NET 9"
+ },
{
"choice": "net8.0",
"description": ".NET 8"
diff --git a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json
index ebaaaa1073..27270458e2 100644
--- a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json
+++ b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json
@@ -34,6 +34,14 @@
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
+ {
+ "choice": "net10.0",
+ "description": ".NET 10"
+ },
+ {
+ "choice": "net9.0",
+ "description": ".NET 9"
+ },
{
"choice": "net8.0",
"description": ".NET 8"
diff --git a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json
index bc3989e97d..07ac31147e 100644
--- a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json
+++ b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json
@@ -34,6 +34,14 @@
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
+ {
+ "choice": "net10.0",
+ "description": ".NET 10"
+ },
+ {
+ "choice": "net9.0",
+ "description": ".NET 9"
+ },
{
"choice": "net8.0",
"description": ".NET 8"
diff --git a/tests/BenchmarkDotNet.Tests/ConfigParserTests.cs b/tests/BenchmarkDotNet.Tests/ConfigParserTests.cs
index 73d29d3611..9f42878148 100644
--- a/tests/BenchmarkDotNet.Tests/ConfigParserTests.cs
+++ b/tests/BenchmarkDotNet.Tests/ConfigParserTests.cs
@@ -162,7 +162,7 @@ public void SpecifyingCoreRunWithFullFrameworkTargetsMostRecentTfm()
CoreRunToolchain coreRunToolchain = (CoreRunToolchain)coreRunJob.GetToolchain();
DotNetCliGenerator generator = (DotNetCliGenerator)coreRunToolchain.Generator;
- Assert.Equal("net9.0", generator.TargetFrameworkMoniker);
+ Assert.Equal("net10.0", generator.TargetFrameworkMoniker);
}
[FactEnvSpecific("It's impossible to determine TFM for CoreRunToolchain if host process is not .NET (Core) process", EnvRequirement.DotNetCoreOnly)]
@@ -388,6 +388,7 @@ public void NetFrameworkMonikerParsedCorrectly(string tfm)
[InlineData("net70")]
[InlineData("net80")]
[InlineData("net90")]
+ [InlineData("net10_0")]
public void NetMonikersAreRecognizedAsNetCoreMonikers(string tfm)
{
var config = ConfigParser.Parse(new[] { "-r", tfm }, new OutputLogger(Output)).config;