Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/BenchmarkDotNet.Build/BenchmarkDotNet.Build.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="5.0.0" />
<PackageReference Include="Cake.Frosting" Version="6.0.0" />
<PackageReference Include="Cake.FileHelpers" Version="7.0.0" />
<PackageReference Include="Cake.Git" Version="5.0.1" />
<PackageReference Include="Docfx.App" Version="2.78.3" />
<PackageReference Include="Docfx.App" Version="2.78.4" />
<PackageReference Include="Octokit" Version="14.0.0" />
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion build/BenchmarkDotNet.Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ public class InstallWasmToolsWorkload : FrostingTask<BuildContext>, IHelpProvide
{
private const string Name = "install-wasm-tools";

public override void Run(BuildContext context) => context.BuildRunner.InstallWorkload("wasm-tools");
public override void Run(BuildContext context)
{
context.BuildRunner.InstallWorkload("wasm-tools-net8");
context.BuildRunner.InstallWorkload("wasm-tools");
}

public HelpInfo GetHelp()
{
Expand Down
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' AND '$(IsFsharp)' != 'true' ">
<LangVersion>12.0</LangVersion>
<LangVersion>14.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(VersionPrefix)' == '' ">
Expand Down
2 changes: 1 addition & 1 deletion build/sdk/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.410",
"version": "10.0.100",
"rollForward": "disable"
}
}
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet.Weaver/BenchmarkDotNet.Weaver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ then run `build.cmd pack-weaver`.
<OutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)</OutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoWarn>$(NoWarn);NU5100;NU5128</NoWarn>
<NoWarn>$(NoWarn);NU5100;NU5127;NU5128</NoWarn>
<!-- AsmResolver is not signed. -->
<SignAssembly>false</SignAssembly>
<DelaySign>false</DelaySign>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void BenchmarkCanAllocateMoreThan2Gb()
.Any());

Assert.Contains(".NET Framework", summary.AllRuntimes);
Assert.Contains(".NET 8.0", summary.AllRuntimes);
Assert.Contains(DotNetRuntimeHelper.GetExpectedDotNetCoreRuntimeName(), summary.AllRuntimes);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void SingleBenchmarkCanBeExecutedForMultipleRuntimes()
.Any());

Assert.Contains(".NET Framework", summary.AllRuntimes);
Assert.Contains(".NET 8.0", summary.AllRuntimes);
Assert.Contains(DotNetRuntimeHelper.GetExpectedDotNetCoreRuntimeName(), summary.AllRuntimes);
}
}

Expand Down
15 changes: 15 additions & 0 deletions tests/BenchmarkDotNet.Tests/Helpers/DotNetRuntimeHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using BenchmarkDotNet.Portability;
using System;

namespace BenchmarkDotNet
{
public static class DotNetRuntimeHelper
{
public static string GetExpectedDotNetCoreRuntimeName()
{
return Environment.GetEnvironmentVariable("DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX") == "2"
? ".NET 10.0"
: ".NET 8.0";
}
}
}
5 changes: 4 additions & 1 deletion tests/BenchmarkDotNet.Tests/RuntimeVersionDetectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public void CurrentRuntimeIsProperlyRecognized()
else
Assert.True(runtime is MonoRuntime, $"Actual runtime: {runtime}, tfm: {runtime.MsBuildMoniker}, moniker: {runtime.RuntimeMoniker}");
#else
Assert.True(runtime is CoreRuntime coreRuntime && coreRuntime.RuntimeMoniker == RuntimeMoniker.Net80, $"Actual runtime: {runtime}, tfm: {runtime.MsBuildMoniker}, moniker: {runtime.RuntimeMoniker}");
if (DotNetRuntimeHelper.GetExpectedDotNetCoreRuntimeName() == ".NET 10.0")
Assert.True(runtime is CoreRuntime coreRuntime && coreRuntime.RuntimeMoniker == RuntimeMoniker.Net10_0, $"Actual runtime: {runtime}, tfm: {runtime.MsBuildMoniker}, moniker: {runtime.RuntimeMoniker}");
else
Assert.True(runtime is CoreRuntime coreRuntime && coreRuntime.RuntimeMoniker == RuntimeMoniker.Net80, $"Actual runtime: {runtime}, tfm: {runtime.MsBuildMoniker}, moniker: {runtime.RuntimeMoniker}");
#endif
}
}
Expand Down