Skip to content

Pass arguments to runner in dotnet new templates #1658

@heaths

Description

@heaths

Templates for dotnet new were added for #1028 but don't use any passed arguments for the runner. With the global tool deprecated, this world provide a convenient way of customizing frameworks, reports, etc. from a console.

So instead of:

public static void Main(string[] args)
{
    var summary = BenchmarkRunner.Run<$(BenchmarkName)>();
}

The templates could use:

public static void Main(string[] args) 
{
    BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
}

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