Bug
Steps to reproduce:
- Run nunit.framework.benchmarks in Release configuration.
- 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
- 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.
Bug
Steps to reproduce:
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
AssemblyOriginatorKeyFilevalue relative to$(MSBuildThisFileDirectory)in src\NUnitFramework\Directory.Build.props and src\NUnitFramework\benchmarks\nunit.framework.benchmarks\nunit.framework.benchmarks.csprojResult after additional steps
Benchmark error
\src\NUnitFramework\Directory.Build.props(72,5): error : Missing AssemblyConfiguration for net6.0Addtional notes
It appears that
TargetFrameworkis empty when BenchmarkDotNet builds boilerplate code. Setting hard-codedAssemblyConfigurationvalue allows benchmarks to run without issue.