Skip to content

Benchmarks fail to run #4806

@MaxKot

Description

@MaxKot

Bug

Steps to reproduce:

  1. Run nunit.framework.benchmarks in Release configuration.
  2. Select ByteAllocationBenchmark, CompositeWorkItemBenchmark or StreamsComparerBenchmark

Expected result

Benchmarks running

Actual result

Benchmark error CSC : error CS7027: Error signing output with public key from file '..\..\nunit.snk' -- File not found.

Additional steps

  1. Set AssemblyOriginatorKeyFile value relative to $(MSBuildThisFileDirectory) in src\NUnitFramework\Directory.Build.props and src\NUnitFramework\benchmarks\nunit.framework.benchmarks\nunit.framework.benchmarks.csproj

Result after additional steps

Benchmark error \src\NUnitFramework\Directory.Build.props(72,5): error : Missing AssemblyConfiguration for net6.0

Addtional notes

It appears that TargetFramework is empty when BenchmarkDotNet builds boilerplate code. Setting hard-coded AssemblyConfiguration value allows benchmarks to run without issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions