Open
Description
Describe the bug
I'm having problems trying to run the benchmark in Performance Improvements in .NET 9 using dotnet run app.cs.
Is the TargetFrameworks property not supported now?
To Reproduce
#:package BenchmarkDotNet@*
#:property TargetFrameworks net9.0;net8.0
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkSwitcher.FromAssembly(typeof(Tests).Assembly).Run(args);
[DisassemblyDiagnoser(maxDepth: 0)]
[HideColumns("Job", "Error", "StdDev", "Median", "RatioSD")]
public class Tests
{
private A _obj = new C();
[Benchmark]
public bool IsInstanceOf() => _obj is B;
public class A { }
public class B : A { }
public class C : B { }
}
Exceptions (if any)
When I run dotnet run benchmark.cs -c Release -f net8.0 --filter ‘*’ --runtimes net8.0 net9.0
error output:
__________________________________________________
项目“E:\vscodeProjects\notebook\benchmark\benchmark.csproj”(Restore 个目标):
C:\Program Files\dotnet\sdk\10.0.100-preview.4.25258.110\NuGet.targets(847,5): er
ror MSB3202: 未找到项目文件“E:\vscodeProjects\notebook\benchmark\benchmark.cspro
j”。
已完成生成项目“benchmark.csproj”的操作 - 失败。
The build failed. Fix the build errors and run again.
Further technical details
- 10.0.0-preview.4.25258.110
- VS Code 1.100.2