Skip to content

Platform benchmarks failing for .NET6.0 (System.TypeInitializationException) #1699

Closed
@L2

Description

@L2

For example:

crank --config "https://raw.githubusercontent.com/aspnet/Benchmarks/master/scenarios/platform.benchmarks.yml" --config foo --application.framework net6.0 --application.collectCounters true --application.startTimeout '00:15:00' --profile bar --scenario caching

Output:

[STDERR] Unhandled exception. System.TypeInitializationException: The type initializer for 'PlatformBenchmarks.BenchmarkApplication' threw an exception.
[STDERR]  ---> System.TypeLoadException: Method 'get_GeneratedSerializerOptions' in type 'JsonContext' from assembly 'PlatformBenchmarks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
[STDERR]    at PlatformBenchmarks.BenchmarkApplication..cctor()
[STDERR]    --- End of inner exception stack trace ---
[STDERR]    at PlatformBenchmarks.BenchmarkApplication.get_ApplicationName() in C:\Users\foo\AppData\Local\Temp\benchmarks-agent\benchmarks-server-bar\foo-bar\benchmarks\src\BenchmarksApps\Kestrel\PlatformBenchmarks\BenchmarkApplication.cs:line 17
[STDERR]    at PlatformBenchmarks.Program.Main(String[] args) in C:\Users\foo\AppData\Local\Temp\benchmarks-agent\benchmarks-server-bar\foo-bar\benchmarks\src\BenchmarksApps\Kestrel\PlatformBenchmarks\Program.cs:line 25
[STDERR]    at PlatformBenchmarks.Program.<Main>(String[] args)

Changing the framework to net5.0 seems to work fine.

I'm using the latest crank and crank-agent: version 0.2.0-alpha.21457.1

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions