Skip to content

BenchmarkRunner.RunSource and BenchmarkRunner.RunUrl doesn't work #1908

@YegorStepanov

Description

@YegorStepanov

'Could not load file or assembly 'System.CodeDom, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

Tested in:

  • VS2022, NET Framework 4.8, empty project, BDN v13.1.
  • Rider, BDN test project, BDN master.

Code:

var s = @"public class Class1
{
    [Benchmark]
    public int Method1() { return 1; }
}";

var error1 = BenchmarkRunner.RunSource(s);

In debugger, I cannot navigate to RunSource() in RunUrl(), the same exception is thrown. Although these methods are in the same file.

var error2 = BenchmarkRunner.RunUrl("https://gist.github.com/lillo42/aa028027af80623cdaf8056a1d9d0728");

Maybe this methods should be hidden from IntelliSense? There is no docs explaining supported format, no info in intellisense describing that it's working on netframework only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions